Skip to content

fix: make persistent chat context and composer UI consistent#4719

Open
ComputelessComputer wants to merge 12 commits intomainfrom
chat
Open

fix: make persistent chat context and composer UI consistent#4719
ComputelessComputer wants to merge 12 commits intomainfrom
chat

Conversation

@ComputelessComputer
Copy link
Collaborator

@ComputelessComputer ComputelessComputer commented Mar 24, 2026

  • keep the context bar and chat input visually aligned by hiding the empty bar, restoring full composer rounding when no context is attached, and removing the right-panel top radius when context chips are present
  • treat chat mentions as typed context for sessions, people, and organizations, keep sent user messages rendering those mentions consistently, and preserve mention labels through draft serialization
  • derive draft mention context without effect-based sync, which keeps restored draft chips available on first render while simplifying the draft plumbing
  • centralize persistent chat session resets in shared chat state so Cmd+N starts a fresh chat when the focused composer owns the shortcut
  • suppress empty reasoning disclosures so blank reasoning parts do not render an empty brain row

@netlify
Copy link

netlify bot commented Mar 24, 2026

Deploy Preview for char-cli-web canceled.

Name Link
🔨 Latest commit 1ae7bfb
🔍 Latest deploy log https://app.netlify.com/projects/char-cli-web/deploys/69c4b0b30304ab0008ce90e5

@netlify
Copy link

netlify bot commented Mar 24, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 1ae7bfb
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69c4b0b39d93710008b4f923

@ComputelessComputer ComputelessComputer changed the title fix: make chat context and mentions behave predictably fix: make persistent chat context and composer UI consistent Mar 25, 2026
@ComputelessComputer ComputelessComputer force-pushed the chat branch 2 times, most recently from 25465fb to 414be6b Compare March 26, 2026 00:32
- Return early from the context bar when there are no context chips
- Keep the add button available only once context is already present
- Hide the context bar entirely when there are no context chips
- Render the composer with full rounded corners when it is no longer attached to a context bar
- Extract mention nodes from the chat draft into typed context refs
- Show mentioned sessions, people, and organizations in the context bar while typing
- Persist mention refs on sent messages and render contact/org context into the chat prompt
- Extract mention nodes from the chat draft into typed context refs
- Show mentioned sessions, people, and organizations in the context bar while typing
- Persist mention refs on sent messages and render contact/org context into the chat prompt
- Flatten mention nodes into plain-text @labels for the visible user message and chat title
- derive plain-text chat content and mention refs from one draft serializer
- mark editor-derived mention refs as draft context instead of removable manual context
- add regression coverage for mention text serialization and ref extraction
- send the global shortcut to the persistent chat new-session action when the composer has focus
- centralize persistent chat session resets in shared chat state so the shortcut and header button stay in sync
- add chat state coverage for starting and selecting chat sessions
- persist mention labels on draft context refs so sent messages keep the typed chip text
- render user message mentions as inline clickable chips using the composer mention styling
- add coverage for mention serialization and user-message tokenization
- move draft serialization and storage helpers into a shared input draft module
- initialize pending draft refs from stored draft state instead of syncing them in useEffect
- keep chat mention and draft tests passing with the new draft initialization flow
- remove the one-off draft context helper and initialize draft refs inline where they are consumed
- simplify draft state initialization by deriving initial content directly from stored draft data
- keep the live draft context callback flow intact for context bar updates without effect sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant