feat(frontend): lead the repository landing view with an outcome-first summary#199
Merged
parthrohit22 merged 1 commit intoJul 26, 2026
Conversation
…t summary The repository primary view, Dependency Graph, and Engineering Review all led with feature/provenance chrome instead of the outcome a user actually needs: ~10 equally-weighted nav destinations, and Snapshot ID / Manifest Digest / Canonical Graph Hash in large mono caps as the first thing on two pages. Add RepositoryOutcomeSummary, a concise stack/structure/dependencies/headline summary composed entirely from the existing Architecture, Review, Dependencies and Insights read APIs (no LLM, no client-side scoring) with an explicit "not assessed" state per section when its snapshot data isn't available. It leads the repository detail page, ahead of the Overview/Explorer tabs. Snapshot/manifest identity is reachable one click away via "Verify", which reveals the existing RevisionManifestPanel -- the same collapsed-by-default provenance panel Architecture already uses, now reused on Dependency Graph and Engineering Review too instead of an always-visible identity grid. Sidebar navigation now groups Dashboard/Repositories/Upload/Architecture as the flagship workflow, with the remaining surfaces under a lighter-weight "More" section -- all ten destinations stay fully reachable, just no longer competing equally for attention.
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
The product led with feature/provenance chrome instead of outcome: the repository primary view had no summary at all (just repo.meta stats), and Dependency Graph / Engineering Review both opened with a "Snapshot ID / Manifest Digest / Canonical Graph Hash" identity grid in mono caps before any actual content. Navigation gave all ~10 destinations equal visual weight. This adds a concise, evidence-backed landing summary and moves snapshot identity one click away, everywhere it was previously front-and-center.
Linked issue
Closes #176.
What changed
Frontend only.
useRepositoryOutcomeSummaryhook (features/repositories/hooks/): composes a landing summary purely from the existing Architecture, Review, Dependencies and Insights read APIs (backendService.fetchArchitecture/fetchReview/fetchDependencyGraph/fetchInsights) — no new backend endpoint, no LLM involvement, no client-side scoring. Each of the 5 sections (stack, structure, dependency count, headline finding, extractor/language coverage) is fetched independently and falls back to an explicitnot_assessedstate if that snapshot data isn't available, rather than ever showing a placeholder or fabricated number.RepositoryOutcomeSummarycomponent (features/repositories/components/): renders that summary — stack (language/framework/pattern), structure (modules/components), dependency count, and a headline derived from Review's realfindingsBySeveritycounts (worst non-zero severity wins; an honest "No evidence-backed findings were surfaced" when all are zero, never a synthesized "all clear" score). A "Verify" button reveals the snapshot/manifest identity on demand.RepositoryDetailPage.tsx: now leads withRepositoryOutcomeSummary, above the Overview/Explorer tabs, for any completed repository.DependenciesPage.tsx/EngineeringReviewPage.tsx: the always-visible "Snapshot identity" / "Review identity" grid is gone. Both now reuse the existingRevisionManifestPanel(already used on Architecture, already collapsed-by-default with a "Details" toggle) instead of inventing a second provenance UI.productSurfaces.tsx/Sidebar.tsx: added anavGroup: 'flagship' | 'secondary'field. Sidebar now renders Dashboard/Repositories/Upload/Architecture as the flagship group, and the rest (Dependency Graph, Engineering Review, Insights, Documentation, AI Workspace, Settings) under a lighter-weight "More" heading — smaller icon, regular instead of medium font weight. All ten destinations are still real links with the same hrefs; nothing is hidden, collapsed-behind-a-click, or removed.Acceptance criteria completed
RepositoryOutcomeSummaryonRepositoryDetailPage.Verifytoggle) and on Dependency Graph / Engineering Review (reusedRevisionManifestPanel, collapsed by default).Not assessed, never a placeholder.Testing performed
New/changed test coverage:
useRepositoryOutcomeSummary.test.ts: composes real responses into the summary; picks the correct worst-severity headline; reports "No evidence-backed findings" honestly instead of a fabricated clean score; every section independently falls back tonot_assessed(never a fabricated value) when its API 404s; does nothing while the repository hasn't completed analysis.RepositoryOutcomeSummary.test.tsx: renders real facts from mocked backend responses (not fabricated);Verifyreveals and re-hides theRevisionManifestPanel; rendersNot assessed(never placeholder data) when every source 404s.RepositoryDetailPage.test.tsx(new): the summary leads the completed-repository view, positioned before the tab bar; it does not render for a failed-analysis repository.DependenciesPage.test.tsx/EngineeringReviewPage.test.tsx(new/updated): the snapshot identity grid is gone; the reusedRevisionManifestPanelis collapsed by default (id/verification state visible, hashes hidden) and reveals hashes only after "Details" is clicked.Sidebar.test.tsx: added a case asserting the flagship/secondary grouping, the "More" divider, that every secondary link is still a real reachable<a href>(reduced emphasis, not removal), and the font-weight difference between groups.I could not exercise this in an actual browser in this environment (no backend running, no browser/screenshot tooling available) — verification is via the vitest suite above, which renders the real components against mocked API responses rather than mocking the summary/provenance logic away.
Screenshots
Not applicable — I have no browser/screenshot tooling in this environment. The new
RepositoryOutcomeSummaryreuses the app's existing card/tile visual language (samerounded-xl border border-border bg-cardpattern asStat/InfoCardelsewhere), and the "Verify" disclosure reuses the existingRevisionManifestPanelcomponent, so no new visual design was introduced. Reviewer can verify withnpm run devagainst an analysed repository.Security and data considerations
None. This is a read-only, client-side re-composition of data already served by existing, already-authorized endpoints (Architecture/Review/Dependencies/Insights) for the currently-viewed repository — no new backend surface, no new data access, no change to auth or owner-scoping. Provenance/hash data is still gated by the same "one click away" pattern already established by
RevisionManifestPanelon Architecture; this PR only extends that pattern to two more pages instead of inventing a new one.Dependencies and blocked work
None. (This was intentionally sequenced after PR #198 (#175/#179), since it touches
RepositoryDetailPage.tsx/DependenciesPage.tsx/EngineeringReviewPage.tsx, which is now merged todev.)Scope changes or remaining work
None for the acceptance criteria above. Note: the flagship/secondary nav split is a judgment call (flagship = the upload → analyse → understand-structure loop: Dashboard, Repositories, Upload, Architecture) since the issue didn't specify an exact grouping — happy to adjust if a different split is preferred.
Contributor checklist
devupstream/devupstream/devCloses) is used only because the issue is fully resolved