You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 51c9181
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(web): shared shortcut dispatcher; stores own drafts and previews
Adds the web building blocks the later layers use: one module-level
keyboard and menu dispatcher, shared intersection and document-activity
stores, keyed asset URL atoms, a composer draft store that promotes
drafts and starts uploads itself, and a preview store that hands out
agent reveals where snapshots arrive.
Effect categories removed:
- window keydown and desktop menu listeners replaced by one dispatcher
with app-global and element scopes; chat route commands read route,
drafts and panels at keypress time
- modifier-key tracking and permission polling moved into shared stores
read with useSyncExternalStore
- visibility observers moved to ref callbacks on a shared
IntersectionObserver
- workspace image URL fetch effect moved to atoms keyed by revision
- draft promotion decided by a store-level state machine
- uploads started by the draft store actions that add attachments
- preview reveal and device session diffing moved to where snapshots
arrive, in an app-lifetime worker
Bugs fixed:
- A reconnect minted workspace image URLs twice, and every remount
re-minted an unchanged image.
- Attachments added to a draft not on screen, or a draft moved to another
machine, never uploaded, leaving Send blocked behind "still uploading".
- A slow image read could overwrite a newer persisted attachment list.
- Agent-opened previews in background threads only appeared on the next
visit, and a device opened during a disconnect was missed.
Temporary compat shims (removed in a later layer of this stack):
- composerDraftStore.ts: re-exports useBackgroundDraftSubmissionPending for the base ThreadRouteView, which keeps running draft promotion and missing-thread cleanup until ChatView and ThreadRouteView land in the web-chat-view layer (removed in layer 12)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments