fix(ui): replace workspace divergence toast with persistent banner #70

Merged
salmaelsoly merged 8 commits from development_workspace_divergence_banner into development 2026-06-02 13:39:02 +00:00
Member

Summary

  • Replace the transient 4-second toast for workspace-path divergence with a persistent WorkspaceDivergenceBanner attached to the assistant message
  • Add requested_workspace_path to the message.send RPC response so the UI has a server-authoritative signal for divergence detection
  • Extend the Msg type with workspaceDivergence?: { wanted, got } so banner state survives re-renders
  • New WorkspaceDivergenceBanner component: persistent red-bordered panel with both paths, explanation, and a "Fix workspace" button

Closes #41

Changes

  • crates/hero_shrimp_server/src/rpc/methods/session.rs — emit requested_workspace_path alongside workspace_path in the include_workspace_in_response block
  • crates/hero_shrimp_web/ui/src/store.ts — add workspaceDivergence field to Msg; replace toast() with setMessages attachment; prefer server-supplied field with client-side heuristic fallback
  • crates/hero_shrimp_web/ui/src/components/WorkspaceDivergenceBanner.tsx (new) — persistent banner component following StallBanner.tsx pattern
  • crates/hero_shrimp_web/ui/src/components/ChatThread.tsx — render banner after incomplete-turn affordance, before job panel

Test Results

153/163 tests passed. All 10 failures are pre-existing environment issues unrelated to this PR (bubblewrap detection, missing sh/python3 in sandbox, malformed YAML in 5 SKILL.md files).

## Summary - Replace the transient 4-second toast for workspace-path divergence with a persistent `WorkspaceDivergenceBanner` attached to the assistant message - Add `requested_workspace_path` to the `message.send` RPC response so the UI has a server-authoritative signal for divergence detection - Extend the `Msg` type with `workspaceDivergence?: { wanted, got }` so banner state survives re-renders - New `WorkspaceDivergenceBanner` component: persistent red-bordered panel with both paths, explanation, and a "Fix workspace" button ## Related Issue Closes https://forge.ourworld.tf/lhumina_code/hero_shrimp/issues/41 ## Changes - `crates/hero_shrimp_server/src/rpc/methods/session.rs` — emit `requested_workspace_path` alongside `workspace_path` in the `include_workspace_in_response` block - `crates/hero_shrimp_web/ui/src/store.ts` — add `workspaceDivergence` field to `Msg`; replace `toast()` with `setMessages` attachment; prefer server-supplied field with client-side heuristic fallback - `crates/hero_shrimp_web/ui/src/components/WorkspaceDivergenceBanner.tsx` (new) — persistent banner component following `StallBanner.tsx` pattern - `crates/hero_shrimp_web/ui/src/components/ChatThread.tsx` — render banner after incomplete-turn affordance, before job panel ## Test Results 153/163 tests passed. All 10 failures are pre-existing environment issues unrelated to this PR (bubblewrap detection, missing `sh`/`python3` in sandbox, malformed YAML in 5 SKILL.md files).
fix(ui): replace workspace divergence toast with persistent banner
Some checks failed
Verify / verify (push) Failing after 11s
Verify / verify (pull_request) Failing after 11s
5014687a60
When the server runs a turn in a different directory than the operator
pinned, the UI now attaches a persistent WorkspaceDivergenceBanner to
the assistant message instead of showing a transient 4-second toast.
The banner remains visible, shows both the requested and actual paths,
and offers a direct "Fix workspace" button.

Server-side, the message.send response now includes
requested_workspace_path alongside workspace_path so the client can
compare server-authoritative fields rather than relying solely on the
client-side normalization heuristic.

#41
chore(ui): rebuild frontend bundle with workspace divergence banner
Some checks failed
Verify / verify (push) Failing after 15s
Verify / verify (pull_request) Failing after 15s
b744a5dbc4
Compiled output for the workspace divergence banner changes.
salmaelsoly force-pushed development_workspace_divergence_banner from b744a5dbc4
Some checks failed
Verify / verify (push) Failing after 15s
Verify / verify (pull_request) Failing after 15s
to d38dbd32c2
Some checks failed
Verify / verify (pull_request) Failing after 23m11s
Verify / verify (push) Failing after 23m11s
2026-06-02 07:58:59 +00:00
Compare
ci: pre-build eval binary in Build step to avoid OOM recompile
Some checks failed
Verify / verify (pull_request) Failing after 3s
Verify / verify (push) Failing after 2s
32844398eb
fix(ui): repair workspace divergence detection
Some checks failed
Verify / verify (pull_request) Failing after 4s
Verify / verify (push) Failing after 3s
e22720bd32
salmaelsoly force-pushed development_workspace_divergence_banner from e22720bd32
Some checks failed
Verify / verify (pull_request) Failing after 4s
Verify / verify (push) Failing after 3s
to afe2c5a7a2
All checks were successful
Verify / verify (pull_request) Successful in 14m28s
Verify / verify (push) Successful in 13m17s
2026-06-02 09:40:26 +00:00
Compare
fix(ui): correct workspace divergence banner copy
Some checks failed
Verify / verify (push) Failing after 10m21s
Verify / verify (pull_request) Successful in 15m21s
ca1508415d
salmaelsoly force-pushed development_workspace_divergence_banner from ca1508415d
Some checks failed
Verify / verify (push) Failing after 10m21s
Verify / verify (pull_request) Successful in 15m21s
to 5358759e9a
Some checks failed
Verify / verify (pull_request) Failing after 5m18s
Verify / verify (push) Has been cancelled
2026-06-02 12:43:43 +00:00
Compare
ci: set RUST_MIN_STACK to stop flaky rustc SIGSEGV in engine codegen
Some checks are pending
Verify / verify (push) Waiting to run
Verify / verify (pull_request) Waiting to run
cb80d0eb90
ci: revert CI workflow changes
All checks were successful
Verify / verify (push) Successful in 17m38s
Verify / verify (pull_request) Successful in 17m12s
5ebb5d1a31
salmaelsoly merged commit f108c381e1 into development 2026-06-02 13:39:02 +00:00
salmaelsoly deleted branch development_workspace_divergence_banner 2026-06-02 13:39:12 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_shrimp!70
No description provided.