Repository navigation
fix(chat): Tell an already-open Chat surface when Director or Harness changes - #480
Merged
Merged
Conversation
… changes Co-authored-by: Cursor <cursoragent@cursor.com>
omesser
force-pushed
the
fix/473-chat-settings-mode-reload
branch
from
September 7, 2026 09:03
4ea7833 to
0a8622c
Compare
This was referenced Sep 7, 2026
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.
Why
Open Chat, flip Director on or off (or Harness off or on) in Settings, and the window stays in the mode it opened with: composer ready,
empty-none, orempty-off. The buddy on the desk follows the new setting; this surface does not. Closing and reopening Chat shows the right mode. macOS, Windows, and X11 Settings all write the sameSettingsSession::apply, so the miss is on every OS. The tray Director toggle had the same gap.What changed
chat-openingnow carries a fullChatOpening(configured / enabled / login), andchat.jsre-runsattached()on that event instead of only updating the header.Settings
applysendsReloadChatwhen Director or Harness source actually changes; the frame loop pushes afterapply_switchso inspect is current. No per-OS Settings code. The in-window log is not wiped — this is a push, not a webview reload.Deliberately not done: spawning or dropping a Harness session mid-run (ADR-0008). Harness off/on still takes the next launch; Chat then matches what a freshly opened window would show now. HTTP Completer attach while Chat is open still updates on send.
How to verify
cargo test --manifest-path src-tauri/Cargo.toml --bin ai-buddy open_chat_surfacecargo test --manifest-path src-tauri/Cargo.toml --bin ai-buddy director_on_patchcargo test --manifest-path src-tauri/Cargo.toml --bin ai-buddy chat_opening_from_inspectcargo test --manifest-path src-tauri/Cargo.toml --bin ai-buddy chat_who_after_switchcargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warningsempty-offvs composer without closing the window. Toggle Harness — Chat should match a window you close and reopen (often unchanged until relaunch).Notes
Harness attach remains a next-launch restart (#436). This PR only makes an already-open Chat surface re-read the opening a new one would.
Closes #473
— Cursor agent, on @omesser's behalf.
Made with Cursor