Skip to content

fix: sidecar dylib loading, ModelSetup UX, AI prompts#10

Merged
Szymon0C merged 2 commits intomainfrom
claude/gifted-satoshi
Apr 4, 2026
Merged

fix: sidecar dylib loading, ModelSetup UX, AI prompts#10
Szymon0C merged 2 commits intomainfrom
claude/gifted-satoshi

Conversation

@Szymon0C
Copy link
Copy Markdown
Owner

@Szymon0C Szymon0C commented Apr 4, 2026

Summary

  • Sidecar crash fix: llama-server needed 8 shared libraries (.dylib) that weren't being copied. Updated setup-sidecar.sh to extract all dylibs, fix @rpath@loader_path, and added build.rs logic to copy libs to target/debug/
  • ModelSetup restyled for 300px sidebar: compact layout, hardware info in two-column format, error display from aiStore
  • Chat no longer shows raw HTML: streaming shows status indicator ("Generating... 150 tokens"), saves friendly summary message on completion
  • AI prompts rewritten: detailed styling instructions, no empty images, CSS gradients for placeholders, extractHtml() strips markdown fences and artifacts from preview
  • Debug logging with [AI], [ChatPanel], [ModelSetup] prefixes throughout model download/sidecar flow
  • Claude Code guide added to docs/ and deployed to GitHub Pages

Test plan

  • Run bash scripts/setup-sidecar.sh — verify dylibs are copied and binary runs
  • pnpm tauri dev — verify sidecar starts (check [AI] Sidecar running on port in console)
  • Create new project, send prompt — verify chat shows "Generating..." not raw HTML
  • Verify preview has no markdown artifacts or explanation text
  • Check ModelSetup fits in sidebar without horizontal scrollbar

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added new practical guide documentation covering tools, workflow, and debugging.
    • Improved AI model setup with enhanced error feedback and better download status display.
  • Documentation

    • Expanded README with detailed app pages, deployment options, AI model specifications, and storage categories.
  • Improvements

    • Enhanced streaming UI with status indicators instead of raw output.
    • Refined AI generation output with stricter formatting rules for cleaner HTML.
    • Better error handling and user feedback throughout the setup flow.

Szymon0C and others added 2 commits April 4, 2026 13:09
…l info, app pages

- Expand project structure tree to list every component, store, page, lib, and Rust module
- Add App Pages table (Home, Project, Templates, Settings)
- Add Deploy section explaining each provider and local export
- Add AI Model section with model sizes and hardware recommendations
- Update Tech Stack to include SQLite details and local HTML export
- Update sidecar version reference to b7472
- Replace ASCII box-drawing with portable characters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix llama-server crash: copy shared libraries (.dylib) alongside binary,
  fix @rpath -> @loader_path, add build.rs to copy libs to target dir
- Restyle ModelSetup for 300px sidebar: compact layout, show errors from aiStore
- Fix chat showing raw HTML: stream status indicator instead of raw tokens,
  save friendly summary messages instead of HTML code
- Rewrite AI system prompts: detailed styling instructions, no empty images,
  realistic content, extractHtml() strips markdown fences and artifacts
- Add comprehensive debug logging with [AI], [ChatPanel], [ModelSetup] prefixes
- Add Cargo.lock to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39a9fa9f-51aa-4901-a9c2-3c49a38a7fe9

📥 Commits

Reviewing files that changed from the base of the PR and between ccac278 and 434239b.

⛔ Files ignored due to path filters (1)
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • .gitignore
  • README.md
  • docs/claude-code-guide.html
  • scripts/setup-sidecar.sh
  • src-tauri/build.rs
  • src/components/chat/ChatPanel.tsx
  • src/components/chat/ModelSetup.tsx
  • src/hooks/useAiStream.ts
  • src/lib/prompts.ts
  • src/stores/aiStore.ts
  • src/stores/chatStore.ts

Walkthrough

The PR updates documentation with expanded feature descriptions and architecture details, adds sidecar library management to the Rust build pipeline, improves the setup-sidecar.sh script for cross-platform binary and library handling, and refactors the AI streaming state from streamBuffer to streamStatus while enhancing model setup UI and system prompts.

Changes

Cohort / File(s) Summary
Documentation & Configuration
.gitignore, README.md, docs/claude-code-guide.html
Exclude Cargo.lock from version control; expanded README with detailed feature descriptions (template gallery, deploy options, app pages, AI models, tech stack) and project structure; added comprehensive Polish-language HTML guide with navigation, sections, interactive UI (tabs, accordions, counters).
Build & Setup Scripts
scripts/setup-sidecar.sh, src-tauri/build.rs
Enhanced setup-sidecar.sh with platform-specific library presence checks, dynamic library load path rewriting, .dylib/.metal/.dll file extraction and copying, and symlink creation; extended build.rs with copy_sidecar_libs() to copy runtime dependencies from binaries directory to target directory based on file timestamps.
Chat UI & State Management
src/components/chat/ChatPanel.tsx, src/components/chat/ModelSetup.tsx, src/stores/chatStore.ts
Replaced streamBuffer with streamStatus in chat state; updated ChatPanel to use streamStatus and show "Preparing download..." placeholder; enhanced ModelSetup with error alerts, expanded logging, loading state flow changes, and UI refinements (badge text, hardware display, button labeling).
AI Streaming & Prompts
src/hooks/useAiStream.ts, src/lib/prompts.ts, src/stores/aiStore.ts
Refactored useAiStream to replace buffer accumulation with periodic setStreamStatus updates and use addMessage for chat scope; added extractHtml() utility to parse AI responses and clean HTML; updated system prompts with "CRITICAL OUTPUT RULES" for stricter formatting; added comprehensive logging to AI store actions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Poem

🐰 wiggles nose with delight

The streams flow cleaner, with status so clear,
Binaries hop across platforms without fear,
Build-time magic copies what sidecar needs best,
HTML prompts stronger—the rabbit puts docs to the test! 📚✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/gifted-satoshi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Szymon0C Szymon0C merged commit 4110330 into main Apr 4, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant