Uh oh!
There was an error while loading. Please reload this page.
refactor(ui-react): consolidate app shell session state - #508
Merged
Conversation
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 freeto 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
thinking_delta/thinking_completecan update thinking text and truncated flags atomically from the caller's point of view.useStateplacement.Why
Refs #477
AppShell kept 11 per-session UI maps as separate top-level state entries. Every new per-session UI concern had to touch the AppShell top level, and archive/delete cleanup had to remember every individual map. This PR gives those maps one local owner without introducing an external store.
Scope
Changed:
app-shell-session-ui-state.tsowns the AppShell per-session UI controller, setters, same-frame refs, and centralized session cleanup.app-shell.tsxreads/writes those maps throughuseAppShellSessionUiState().useStateplacement.thinking_deltasets the flag, and a shortthinking_completereplaces text and clears the flag.Not included:
Verification
npm run -w @maka/desktop test(1847 passed)npm run -w @maka/desktop build:renderer(passes; existing Vite large chunk warning remains)User-facing impact
None expected. This is a React state-ownership refactor; UI copy, layout, and behavior should remain unchanged.
Reviewer notes
The PR is split into rollback-sized commits:
refactor(ui-react): add app shell session ui reducerrefactor(ui-react): use reducer for app shell session statefix(ui-react): preserve nested session ui updates