Delta Command: conversational UI#12
Draft
nfaggian wants to merge 1 commit into
Draft
Conversation
Rework the AI surface so it reads as a modern conversational interface
instead of a dashboard with a one-shot briefing button.
Backend
- POST /api/chat replaces the callable role of /api/briefing. Takes a
full { messages: [{role, content}] } history and returns the next
assistant reply. The backend embeds a summary of the live database in
the system prompt on every turn, so the client never sends state.
- /api/briefing is preserved as a canned first-turn wrapper for CLI /
non-chat callers; both endpoints share call_llm(messages).
- New ChatRequest / ChatTurn Pydantic models.
- Backend context prompt broadened to include top active opportunities
and available engineers so replies can name specifics.
- Tests cover 400/503/success paths for /api/chat.
Frontend
- New /chat route as the primary AI surface:
* empty-state hero ("What do you need to know?") + four starter
prompt tiles
* full-height message thread, user bubbles right / assistant left
with a Δ mark, MarkdownLite for bold/italic/code/bullets
* client-side reveal animation with a blinking accent caret at the
tip, driven by an abortable timer (Stop button is wired)
* three-dot typing indicator for the "Analyzing pipeline…" phase
* multi-line composer with ⌘⏎ / ⏎ submit, Shift+⏎ newline, auto-grow
to ~8 rows, disabled-until-content Send button
* copy button on assistant replies, New chat reset in the top bar
* ?prompt=<starter-id> deep-link auto-submits the first turn
- Sidebar: Chat promoted to the first nav item with an accent icon and
an AI badge; a divider separates it from the data-first nav.
- Dashboard: standalone ExecutiveBriefingPanel replaced by an
AskDeltaCallout that presents Delta plus three deep-linked starter
prompts.
- New keyframes: typing-dot, caret-blink, message-in (fade+lift).
- READMEs updated for the /api/chat endpoint and /chat surface.
Verified: next build clean (chat bundle 6.35 kB / 122 kB First Load),
tsc --noEmit clean, 16/16 backend tests pass.
Co-authored-by: Nathan Faggian <nathan.faggian@gmail.com>
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 free
to 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.
Reworks the AI surface so it reads as a modern conversational interface (Claude, ChatGPT, Cursor Chat, Perplexity) rather than a dashboard with a one-shot "Generate" button.
What changed
Backend
POST /api/chataccepts a full{ messages: [{role, content}] }history and returns the next assistant reply. The system prompt embeds a summary of the live database on every turn — the client never sends state.POST /api/briefingis preserved as a canned first-turn wrapper. Both endpoints share a commoncall_llm(messages)under the hood.ChatRequest/ChatTurnPydantic models;build_contextbroadened to include the top-N active opportunities and available engineers so replies can name specifics./api/chat, including forwarded-history assertions.Frontend
/chatroute as the primary AI surface:MarkdownLitefor bold / italic / code / bullets⌘⏎/⏎submit,Shift+⏎newline, auto-grow to ~8 rows, disabled-until-content Send button?prompt=<id>deep-link auto-submits the first turnChatpromoted to the first nav item with an accent icon +AIbadge; a divider separates it from the data-first nav.ExecutiveBriefingPanelreplaced byAskDeltaCallout, which presents Delta plus three deep-linked starter prompts. Deleted the panel component.typing-dot,caret-blink,message-in(fade + lift).Design principles applied
Verification
next buildclean; new chat bundle is 6.35 kB / 122 kB First Load JStsc --noEmitclean/api/chattestsEmpty state
Chat empty state
Streaming reveal (caret visible after "capacity):")
Chat streaming
Complete reply
Chat answered
Composer with follow-up drafted
Chat follow-up input
Dashboard callout (deep-links into
/chat?prompt=…)Dashboard with Ask Delta callout
Stacking
Stacked on
cursor/ui-precision-535c(PR #11) →cursor/llm-briefing-535c(PR #9). All roll up to the futurenfaggian/delta-toolsmain.To show artifacts inline, enable in settings.