Skip to content

refactor(desktop): move the composer's mention sources into their own hook - #4355

Merged
LHagfoss merged 1 commit into
mainfrom
refactor/desktop-composer-mention-sources
Nov 25, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
refactor/desktop-composer-mention-sources

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

ui/Composer.tsx sat at 1,493 lines, 7 under the 1,500-line cap, so the next change to the composer would have failed fileSize.test.ts.

The threads, delegates and agents the @/# drawer lists (and the project home dictation also reads) move to a hook of their own, ui/useMentionSources.ts. The code is moved unchanged, apart from its inline comments, which are folded into the hook's doc comments. Composer is now 1,401 lines. The comment baseline is lowered to match.

Changelog

Internal: split the composer's mention sources into their own hook.

Testing

  • bun run check: all pass except the known flaky stopTrace.store.test.ts › "a harness that ignores the Stop is forced". bunx vite build and check-comments.py pass.
  • Mock: typing @ lists keywords, agents and machines as before; @threads lists the other threads.

@github-actions github-actions Bot added the refactor Code improvement and restructuring label Nov 25, 2026
@LHagfoss
LHagfoss merged commit c58e4ec into main Nov 25, 2026
10 checks passed
@LHagfoss
LHagfoss deleted the refactor/desktop-composer-mention-sources branch November 25, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code improvement and restructuring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant