feat(ui): add floating help chat widget powered by Docs Q&A (#391) - #392
Merged
Conversation
Add a floating help chat button in the bottom-right corner that opens an expandable chat panel. Users can ask questions about Trinity and get instant answers from the Vertex AI Search-powered documentation. Features: - Floating button (authenticated pages only) - Multi-turn conversations with session persistence - Markdown rendering with DOMPurify sanitization - Loading indicator and error handling with retry - Keyboard navigation and ARIA accessibility - New conversation button to reset session Closes #391 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
vybe
force-pushed
the
feature/391-help-chat-widget
branch
from
April 18, 2026 12:35
b08b540 to
431e012
Compare
dolho
added a commit
that referenced
this pull request
Aug 28, 2026
…ee latent desyncs (ent#451) Blocker 1 was real and I had not seen it. `resolveAgentQuery` passed `forceNew` to `resolveAgentLanding` and set `pendingSession = null`, but never raised `startingNewChat` — so `/workspace?agent=X&new=1` rendered an empty conversation and then sent `new_thread: false`, resuming the thread the user asked to leave. The reported bug, intact on the documented `?new=1` contract, in the PR that exists to fix it. The cause is the one this PR is about, one level up: `route.query.new` was read in two places for two different decisions — WHICH THREAD to land on and WHAT THE FIRST SEND ASKS FOR — and only the first honoured it. Now read ONCE into a local that feeds both, so they cannot drift again. AND-ed with the landing result, so a `?new=1` that still resolved a thread never claims a fresh start. Blocker 2: a frontend test, which the change genuinely had none of — the `1497 passed` in the body was the pre-existing suite, as the review says. `workspaceNewChat.spec.js` (9 tests) covers the deep link, the watcher branch ORDER, the first-paint guard, both send conjunctions, and the settle-everywhere rule, using the two established patterns (pure function + source assertion in the `portalLeaveSpecificRoute.spec.js` shape) since vitest runs `environment: 'node'` with no mount harness. Mutation-checked, and M1 is the reviewer's own blocker: reverting it turns the suite red. Blocker 3: `test_history_without_a_session_is_unchanged` cited "the spec in tests/unit/... frontend suite" — a dangling reference asserting coverage that did not exist. It now names the real file. Comments addressed: * Three more sites nulled `pendingSession` without settling the intent — the deep-link watcher (the commonest way in), `openRoom`, `openAgentPage`, plus the unreachable-agent branch. Latent because both consumers AND on "no session yet", but a flag that is only correct because of a second variable is one refactor from being wrong, and the declaration claims it is cleared the moment a real thread exists. Now true. * `test_both_turn_entry_points_forward_it` was `getsource` + a substring, so a comment or a misspelled kwarg satisfied it. It now BINDS the keyword against each service signature and asserts the routes forward `body.new_thread` through a comment-stripped source — verified by mutation. * `workspace-absorbs-session.md` updated at both seams the change touches (`resolveAgentLanding`'s landing rule and `_resolve_session_id`'s three states), and `architecture.md`'s Workspace section documents the new public `new_thread` field on the ent#83 headless surface. * Gating stated rather than inferred: "OSS-core by decision (ent#451)", matching the ent#326/#384/#392 convention. ONE CORRECTION, offered with evidence rather than silently applied. The review says "`test_ent457_portal_turn_kwargs.py` doesn't exist on `dev`, #2427 introduces it". It does exist on `dev` — added by d6a4bc1 (ent#457) — and #2427 modifies it. `git cat-file -e origin/dev:tests/unit/test_ent457_portal_turn_kwargs.py` succeeds, and `backend-unit-test` is failing on `dev` independently of any PR. So the body's "fails on dev today" stands. Everything else in the review is accepted as written. Verification: frontend 1497 -> 1506 (+9). Backend 392 passed on the portal selection, the same 2 pre-existing dev failures unchanged. Related to ent#451 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
Summary
ask-trinityCloud Function (Vertex AI Search)Changes
src/frontend/src/components/HelpChatWidget.vue— New floating widget componentsrc/frontend/src/App.vue— Mount widget for authenticated usersdocs/memory/feature-flows/trinity-docs-qa.md— Document the UI integrationTest Plan
Closes #391
🤖 Generated with Claude Code