Skip to content

fix(frontend): land #294 + #296 with review fixes — AI Workspace retention copy, Settings landmark, revision labels - #300

Merged
parthrohit22 merged 4 commits into
devfrom
claude/pr-review-294-296-c40qz6
Aug 11, 2026
Merged

fix(frontend): land #294 + #296 with review fixes — AI Workspace retention copy, Settings landmark, revision labels#300
parthrohit22 merged 4 commits into
devfrom
claude/pr-review-294-296-c40qz6

Conversation

@parthrohit22

@parthrohit22 parthrohit22 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lands the work from #294 (sidebar Analysis/Assist grouping, pinned Settings, AI Workspace copy) and #296 (dashboard most-recently-analysed line) rebased onto current dev, plus review fixes for three defects found in them. Both original branches live on a fork this session cannot push to, so their commits are carried here unchanged and with original authorship; the review fixes are a separate commit on top.

Linked issue

Related to #289, #295. Retires the automated baseline entry for #238.

Not using Closes: #289's mobile-navigation and engineer-feedback criteria remain observational, exactly as #294 flagged.

Roadmap alignment

  • Roadmap §23 workstream: W4 / Workflows — turn graph facts into outcomes.
  • §28 market-fit criterion: Trusted output — the AI Workspace copy fix removes a false statement about data retention, and the dashboard revision label stops presenting a truncated prefix as an identity. Also Repeat use for the dashboard summary line.
  • Accepted evidence: component tests asserting the corrected behaviour, plus a full local Playwright acceptance run (below).

What changed

Carried unchanged from #294 and #296 (three commits, original authorship):

  • Sidebar regrouped into labelled Analysis / Assist sections, Settings pinned to the bottom, NavGroup widened to flagship | analysis | assist | utility.
  • Dashboard renders a most-recently-analysed line derived from GET /repositories data it already fetches.

Review fixes (11baa0f):

  • AIWorkspacePage.tsx — corrected false retention claims. The new subtitle said "nothing is remembered once you leave this page" and the empty state said "no history is kept between sessions". Both are the opposite of the shipped behaviour: turns are persisted per owner and repository in ai_conversation_messages and restored on return (AI Workspace loses conversation history on navigation #231 — the model docstring states history "survives navigation away and back"), and useAIWorkspace.ts:100 replays the last eight turns as provider context. Read as a privacy assurance these were false. The copy now describes the real behaviour; the accurate claims (sealed-snapshot grounding, no source-file contents) are kept. The active-repository header also regains the repository name it had lost.
  • Sidebar.tsx — Settings returned to a navigation landmark. Pinning it moved it into a bare footer div, removing it from every landmark and leaving it undiscoverable to landmark-based screen-reader navigation. Same pinned position and separator, now inside its own nav element labelled Settings. The utility lookup also moves from find to filter so a second utility surface cannot silently disappear.
  • DashboardPage.tsx — symmetric, non-lossy revision labels. git rendered as a bare abcdef1 with no kind while upload rendered as upload deadbee. Both now render as kind value, matching InsightsPage and EngineeringReviewPage. The abbreviation is display-only, so the full immutable value is carried in title — a 7-character prefix is not an identity (RFC-0001 §3).
  • accessibility.spec.ts + WCAG_2_2_AA_BASELINE.md — retired the bug: sidebar section label fails WCAG AA contrast #238 allowance. It was keyed to secondary-navigation-label, the element feat(frontend): group sidebar into Analysis/Assist, pin Settings, rewrite AI Workspace copy #294 removes, so it matched nothing and would only have masked a regression on a removed element. The underlying contrast issue is genuinely fixed by a4e30fe.
  • DashboardPage.test.tsx — the ordering test now places the winner neither first nor last, so an implementation that simply took either end of the list can no longer pass by accident.

Compatibility with RFC-0002 and #286

Both PRs were opened before RFC-0002 (#297) and #286 merged. Verified compatible:

  • RFC-0002 is documentation-only — one 307-line markdown file, no code. It states explicitly that acceptance "does not by itself create the repository_lineages table … or alter any API or frontend surface", and that implementation is blocked pending independent ratification (Q5).
  • Revision identity is untouched by it — RFC-0002 §2 defers to RFC-0001 §3, which continues to govern the Repository.revision field this PR renders. The dashboard line stays valid.
  • fix(frontend): name repository row actions #286 touched only RepositoriesPage, which neither PR modifies.
  • All three original commits cherry-picked onto current dev with no conflicts.

Forward note, no action now: once lineage lands, the dashboard line will likely want a lineage display_name rather than the per-row name. That is gated behind the RFC's own implementation block.

Acceptance criteria completed

Testing performed

npm --prefix apps/frontend run test
  Test Files  43 passed (43)
  Tests       231 passed (231)

npx tsc --noEmit                        clean
npm --prefix apps/frontend run lint     clean
npm --prefix apps/frontend run build    built in 959ms
node --test scripts/dependency-audit.test.mjs    9 pass, 0 fail
node scripts/dependency-audit.mjs                no blocking findings
Repository hygiene (tracked dist/.env scan)      clean

Playwright acceptance suite, run in full locally against a real backend (Python 3.13 venv, seeded disposable fixtures):

node scripts/run-prototype-acceptance.mjs
  21 passed, 1 failed (6.6m)

All six accessibility.spec.ts WCAG 2.2 AA checks pass, including authenticated application shell and sidebar — this is the direct evidence that the new Analysis/Assist labels meet AA contrast, that removing the #238 allowance does not expose a violation, and that the added Settings navigation landmark introduces no landmark conflict.

The single local failure was prototype-surfaces.spec.ts:74, waiting on .monaco-editor. It was environmental, not a regression: @monaco-editor/react is used with no local monaco-editor dependency, so it fetches from the jsdelivr CDN, which is unreachable from that sandbox (curl exits 56). Nothing in this PR touches the evidence or code-preview path. Confirmed on CI: the Prototype Browser Acceptance job passed, along with all other checks (Frontend, Backend, API Contract Drift, Repository Hygiene, and both CodeQL analyses).

Screenshots

None attached. The changes are copy, one landmark wrapper, and a revision label; the assertions above cover them, and no new visual surface was introduced.

Security and data considerations

One directly relevant item: the AI Workspace previously told users nothing was retained, while conversation turns are in fact persisted server-side per owner and repository and replayed to the provider as context. That was a false privacy assurance, corrected here. No auth, owner-scoping, secrets, logging, or migration changes; owner-scoping on /ai/conversations is unchanged.

Dependencies and blocked work

Scope changes or remaining work

Contributor checklist

  • This PR targets dev
  • I claimed the issue and had it assigned or acknowledged before starting substantial work
  • The branch was created from an up-to-date upstream/dev
  • The branch is rebased on the latest upstream/dev
  • This PR addresses one clearly scoped issue — it carries two already-open PRs plus their review fixes, at the owner's request
  • This PR advances a §23 workstream toward a §28 market-fit criterion
  • Every acceptance criterion I claim as complete is actually complete
  • Relevant tests pass
  • Documentation is updated for any user-visible change (WCAG baseline updated)
  • No secrets, credentials, local env files, or generated artifacts are included
  • No unrelated files were changed
  • Closing syntax (Closes) is used only because the issue is fully resolved (not used here)
  • Dependencies and follow-up work are linked

parthrohit22 and others added 4 commits August 11, 2026 11:24
…rite AI Workspace copy

Reorders the authenticated sidebar into flagship (Dashboard, Repositories,
Upload), a labelled Analysis group (Architecture, Dependency Graph,
Engineering Review, Insights, Documentation), and a separate Assist group
for AI Workspace, replacing the previously unlabeled "More" section.
Settings moves out of that grouping and is pinned to the bottom of the
sidebar, visually separated above the account identity row.

Also rewrites AI Workspace's page subtitle and zero-message empty state so
it states plainly that it answers from sealed structural facts already
computed by analysis, sends no source-file contents, and keeps no memory
between sessions, rather than reading as a general chat tool.
The new "Analysis" and "Assist" nav section headers inherited the prior
"More" label's text-muted-foreground/70 class, which measures 2.80:1
against the sidebar background -- below the 4.5:1 AA minimum. Dropping
the /70 opacity modifier uses the token at full strength (4.98:1 light,
8.12:1 dark), which is what the Prototype Browser Acceptance CI gate
caught on PR #294.
…board

Adds a single summary line above the metric cards showing which
repository's analysis is most current and at what revision, derived
only from fields the repository list already fetches for this page
(status, analysedAt, revision) -- no new endpoint, no fabricated data.

A "review findings by state" fact was considered but not added: that
data lives behind GET /analysis/{id}/review (engineering-review.v2),
which this page does not fetch, and inventing it here would violate
the authentic-data-only rule rather than extend it.
…s landmark

Review follow-ups to the sidebar regrouping (#289) and the dashboard
latest-analysis line, applied on top of both changes.

AI Workspace copy stated the opposite of what the surface does. The
subtitle claimed "nothing is remembered once you leave this page" and the
empty state claimed "no history is kept between sessions", but conversation
turns are persisted per owner and repository and restored on return (#231,
`ai_conversation_messages`), and the last eight turns are replayed to the
provider as context. Read as a privacy assurance those statements were
false, so they now describe the real behaviour instead. The accurate parts
-- sealed-snapshot grounding and no source-file contents -- are kept, and
the active-repository header regains the repository name it had lost.

Settings was pinned by moving it into a bare footer div, which removed it
from every navigation landmark and left it undiscoverable to landmark-based
screen-reader navigation. It keeps the same pinned position and separator
but now sits in its own labelled nav. The utility lookup also changes from
`find` to `filter` so a second utility surface cannot silently vanish.

Dashboard revision labels now render as `kind value` for both kinds,
matching Insights and Engineering Review, rather than showing a bare
seven-character hex string for git. The abbreviation is display-only, so
the full immutable value is carried in `title`; a prefix is not an
identity. The ordering test now places the winner neither first nor last,
so picking either end of the list can no longer pass by accident.

Retires the #238 accessibility baseline entry: the `More` label it was
keyed to no longer exists, so the automated allowance matched nothing and
would only have masked a regression on a removed element.
@parthrohit22
parthrohit22 merged commit 059fd15 into dev Aug 11, 2026
10 checks passed
@parthrohit22
parthrohit22 deleted the claude/pr-review-294-296-c40qz6 branch August 11, 2026 11:54
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