Skip to content

Web dashboard: Chat tab + hash deep-linking#21

Merged
agr77one merged 1 commit into
mainfrom
feat/web-chat-tab
Jun 16, 2026
Merged

Web dashboard: Chat tab + hash deep-linking#21
agr77one merged 1 commit into
mainfrom
feat/web-chat-tab

Conversation

@agr77one

Copy link
Copy Markdown
Owner

PR 2 of chat→web. A Chat tab backed by the PR1 daemon chat_* actions:
thread-list sidebar, transcript, input, "Ground in my notes" toggle, New/Delete.
Optimistic user message + "Thinking…" during the blocking model call; cites
📚 Grounded in: … when notes context was injected. chat_take_staged prefills
a Ctrl+Shift+A selection on open. location.hash routing (/#chat) so a
hotkey/tray can open straight to Chat. All DOM via textContent (no innerHTML).
Popup still present (retired next PR). node --check clean.

PR 2 of chat→web. Adds a Chat tab to the dashboard backed by the daemon chat_*
actions (PR1):
- index.html: Chat tab + panel (thread-list sidebar, transcript pane, input,
  "Ground answers in my notes" toggle, New/Delete).
- app.js: loadChat/loadChatThreads/openChatThread/sendChat/newChat/
  deleteChatThread. Optimistic user-message render + "Thinking…" while the
  blocking model call runs; "📚 Grounded in: …" when notes context was used.
  On open, chat_take_staged picks up a Ctrl+Shift+A selection (read-and-clear)
  and prefills the box. All DOM via textContent/createElement (no innerHTML).
- location.hash tab routing: `/#chat` (or any tab id) selects that tab, so a
  hotkey/tray can open the dashboard straight to Chat. Clicks update the hash.
- styles.css: chat layout (reuses theme variables).

The tkinter popup still exists (retired in the next PR). node --check clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@agr77one agr77one merged commit 3fff4e8 into main Jun 16, 2026
5 checks passed
@agr77one agr77one deleted the feat/web-chat-tab branch June 16, 2026 12:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfc88595a6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/ui/web/app.js
Comment on lines +944 to +948
chatThreadId = res.thread_id || chatThreadId;
const reply = document.createElement("div");
reply.className = "chat-msg chat-msg-assistant";
reply.textContent = res.reply || "(no reply)";
box.append(reply);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent stale chat sends from mutating active transcript

When a local model call is pending, only the Send button is disabled; the sidebar/New Chat controls remain active and Ctrl+Enter can still invoke sendChat. Because this continuation writes through the mutable global chatThreadId and the shared #chat-transcript, if the user opens another conversation or starts a new one before chat_send returns, the late response resets the active thread and appends the assistant reply into whichever transcript is currently rendered. Capture the request's thread/render token or block navigation/resubmission while a send is in flight.

Useful? React with 👍 / 👎.

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.

2 participants