Fix: post-review cleanup — restore --model, drop dead code & debug logs#470
Closed
daotian-smartnews wants to merge 13 commits into
Closed
Fix: post-review cleanup — restore --model, drop dead code & debug logs#470daotian-smartnews wants to merge 13 commits into
daotian-smartnews wants to merge 13 commits into
Conversation
#2) - Switch from require() to ESM import for @tauri-apps/api/event listen() (require is not available in Vite ESM bundles, causing silent fallback to DOM events) - Enable withGlobalTauri in tauri.conf.json so window.__TAURI_INTERNALS__ is injected and the Tauri event bridge works correctly Co-authored-by: Daotian Zhang <daotian.zhang@smartnews.com>
- Switch claude CLI execution to --print --input-format=stream-json mode so stdin stays open during execution - Add inject_claude_message Tauri command to write user messages into the running claude process stdin mid-turn (matching Claude TUI behavior) - Close stdin automatically on "result" message so the process exits cleanly and the loading spinner clears - Add ~/.local/bin to PATH so claude binary is always found Co-authored-by: Daotian Zhang <daotian.zhang@smartnews.com>
- Display send (left) and stop (right) buttons at the same time instead of toggling between them - Stop button dims when Claude is not executing; send button remains always accessible for mid-turn message injection
…nu, resizable width, and session management (#5) - Add collapsible sidebar showing projects and sessions with expand/collapse per project - Left-click opens session in current tab, right-click shows native macOS context menu - Context menu: Open in New Tab, Rename Session, Delete Session, Refresh Sessions - Right-click on project: Add New Session - Inline rename or via context menu; delete confirmation dialog - Green dot indicator for running sessions - Compact timestamps (<1m, 3m, 13hr, 2d) right-aligned on session row - Custom session names stored in ~/.claude/opcode-metadata.json - Tab title format: ProjectName - SessionName - Resizable sidebar (drag right edge, min 180px / max 480px) - Sidebar-wide native context menu (Refresh Sessions) when not clicking a session - New Session button per project - Open URLs in system default browser instead of in-app webview - Fix user message newlines not rendering - Sidebar visible by default Co-authored-by: zdt90 <zhdt90@gmail.com>
Add a Tauri nav-guard plugin that intercepts all navigation events and opens external http(s):// URLs in the system default browser instead of loading them inside the app webview. Also refactor duplicate markdownComponents inline definitions in StreamMessage.tsx into a shared function. Co-authored-by: zdt90 <zhdt90@gmail.com>
* fix(ui): remove abnormally large gaps between chat messages The virtualized message list rendered very large vertical gaps between messages due to two separate issues: 1. measureElement was attached to a framer-motion element wrapped in AnimatePresence, which made dynamic height measurement unreliable and frequently fell back to the 150px estimate. Move measurement and absolute positioning to a stable native div, and keep only the enter animation on an inner motion.div. 2. displayableMessages did not filter opcode-internal metadata messages (last-prompt, ai-title, mode, queue-operation, attachment). These render as null in StreamMessage but still left empty placeholder rows (~16px each) that piled up into large blank areas. Restrict the list to message types StreamMessage actually renders. Co-authored-by: Cursor <cursoragent@cursor.com> * chore(dev): enable Vite dev server with HMR for tauri dev Set beforeDevCommand and devUrl so `tauri dev` runs the Vite dev server with hot module reload instead of loading the prebuilt dist/. Frontend changes now reflect immediately during development without a manual rebuild and app restart. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: zdt90 <zhdt90@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Fenced code blocks in chat messages now render with a hover-revealed copy-to-clipboard button. Clicking copies the full snippet and briefly shows a confirmation check. Inline code is intentionally left unchanged. Co-authored-by: zdt90 <zhdt90@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
The switch to --print/stream-json mode in execute_claude_code accidentally dropped the --model argument, so newly started sessions silently ignored the user-selected model and fell back to Claude's default. continue/resume already kept --model; this restores it for new sessions to match. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the module-level "BUILD v1 - loaded" log and the per-poll running-sessions JSON dump (printed every 5s), and silence the non-fatal polling-error log. These were development-time aids that only added console noise in production. Co-authored-by: Cursor <cursoragent@cursor.com>
This was a development scratch note that leaked into the tree. Its contents are already out of date (e.g. it lists the resizable sidebar as "currently fixed at 260px" even though resizing was implemented in the same change set), so it is misleading rather than useful. Co-authored-by: Cursor <cursoragent@cursor.com>
The get_setting Tauri command always returned None and was never invoked: the frontend api.getSetting reads from localStorage and the app_settings table directly, never through this command. Remove the command, its registration, and the apiAdapter endpoint mapping (the comment claiming StartupIntro used it was inaccurate). Co-authored-by: Cursor <cursoragent@cursor.com>
inject_claude_message sent the user content as a bare string while the initial prompt sent it as an array of typed content blocks. Use the same array shape in both paths so mid-turn injected messages match the structure Claude already receives for the first prompt. Co-authored-by: Cursor <cursoragent@cursor.com>
TODO.md is a local development scratch pad and should not be tracked (an earlier stale copy had leaked into the repo). Ignore it so future notes stay local. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up cleanup after reviewing the merged changes in
c0be1b8..fb44390.Fixes one functional regression and removes unused / leftover code; no
feature behavior is intentionally changed beyond the model fix.
execute_claude_codelost its--modelargument during theswitch to
--print/stream-json mode, so newly started sessions silentlyignored the user-selected model and fell back to Claude's default.
continue/resumealready kept--model; restored it for new sessions.inject_claude_message) sent theuser content as a bare string while the initial prompt used an array of
typed content blocks — aligned both to the same array shape.
get_settingTauri command (it alwaysreturned
Noneand was never invoked;api.getSettingreads fromlocalStorage /
app_settingsdirectly), plus its registration and theapiAdapter endpoint mapping.
Sidebar.tsx(module-level"BUILD v1" log, the per-poll running-sessions JSON dump every 5s, and a
noisy polling-error log).
TODO.mdthat had leaked into the tree andwas already out of date, and git-ignored it to keep future notes local.
Test plan
cargo checkpasses (verified locally).selected model is actually used.
per-5s running-sessions dump.
Notes / out of scope
get_project_sessions)was left as-is — likely intended, but affects all session lists, not just
the sidebar. Flagging for confirmation.
open_devtoolstriggers anever usedwarning for the web binary(the dev-only "Inspect Element" menu); not addressed here.