feat(frontend): surface most recently analysed repository on the dashboard - #296
Closed
parthrohit22 wants to merge 1 commit into
Closed
Conversation
…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.
Collaborator
Author
|
closed as superseded |
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
Adds a single summary line to the Dashboard, above the metric cards, surfacing which repository's analysis is most current and at what revision — sourced only from data this page already fetches (
GET /repositories), with no new endpoint and no fabricated metric.Linked issue
Closes #295
Roadmap alignment
What changed
apps/frontend/src/app/pages/DashboardPage.tsx: derivesmostRecentlyAnalysedviauseMemofromrepositories(already fetched byuseRepositoryDashboard), filteringstatus === 'completed'with a non-nullanalysedAt, reducing to the latest. Renders one line:Most recently analysed: {name} — {date} at revision {short revision}. AshortRevisionLabelhelper formats the existingRepository.revisionfield (git→ 7-char SHA;upload→ short content hash with thesha256:prefix stripped) — both values already present on the repository record (chore: persist commit SHA and content identity for every repository import #87 revision identity), nothing invented.apps/frontend/src/app/pages/DashboardPage.test.tsx(new): 4 tests covering the happy path (latest of several picked correctly, byanalysedAt), upload-revision formatting, omission when nothing is analysed yet, and the existing empty-state path when there are no repositories at all.Acceptance criteria completed
From #295, all complete:
analysedAtand real revision identity already on the repository record.Testing performed
Not run:
npm run test:prototype(Playwright acceptance) — no backend/contract surface changed, and the live manual verification above already exercised the real authenticated app end to end.Screenshots
Live screenshot captured during manual verification (see Testing performed) showing the rendered line against six real completed repositories on the Dashboard. Available on request — not yet attached to this PR (no CLI path to upload a binary image to a GitHub comment; happy to walk through attaching it).
Security and data considerations
None. No auth, owner-scoping, secrets, logging, or migration changes. Purely a derived read from data already returned to the authenticated, owner-scoped
GET /repositoriesresponse.Dependencies and blocked work
None.
Scope changes or remaining work
"Review findings by state" (from the original ask this issue was scoped from) is explicitly not included: it requires
GET /analysis/{id}/review(engineering-review.v2), which this page does not fetch. Adding it would mean either a new fetch on a page that currently has none, or fabricating the count — both out of scope here. Flagged in #295's non-goals and left for a separate, explicitly-scoped follow-up if wanted.Contributor checklist
devupstream/devupstream/devCloses) is used only because the issue is fully resolved