refactor(workspace): chat UX polish sweep — paper cuts #612
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/572"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses all paper-cut items from #572 in a single sweep.
Test plan
0 turns/1 turn/N turnsrenders correctly (null-safe)Closes #572
behavior
apps/web/src/routes/workspace.index.tsxlines ~620–638: draft-persistence session-switch bug. WhenactiveSessionIdchanges,draftKeychanges, and both the save effect ([draft, draftKey]) and the restore effect ([draftKey]) fire in the same commit. The save effect runs first with the old session's draft and the newdraftKey, overwriting whatever the new session had saved in localStorage. Then the restore effect reads back the corrupted value. Net result: switching from session A to session B clobbers session B's saved draft with session A's text. To fix: dropdraftKeyfrom the save effect's dependency array (suppress the lint warning with a comment), or use auseRefto skip saves when the key just changed.behavior (nit, not blocking)
apps/web/src/components/planner/composer.tsx~line 152:group-disabled:hiddenon the⌘↵hint span requires a parent element with a Tailwindgroupclass in disabled state. IfButtondoes not render withgroup, the shortcut stays visible when the send button is disabled. Worth a spot-check.Fixed both findings:
draftKeyfrom save effect deps; session switch no longer writes the outgoing draft under the incoming session key. SuppresseduseExhaustiveDependencieswith abiome-ignorecomment explaining why the omission is safe.grouptoButton's base CVA class sogroup-disabled:hiddenon child spans resolves against the button's own:disabledstate.Session-switch draft bug fixed:
draftKeyexcluded from the save effect deps with a clearbiome-ignorecomment, andgroupadded toButton's base class sogroup-disabled:hiddenworks. CI green. LGTM.