Skip to content

feat(web): React yield views — sessions + projects (AUR-270)#28

Merged
mishanefedov merged 1 commit into
mainfrom
aur-270-yield-views
May 4, 2026
Merged

feat(web): React yield views — sessions + projects (AUR-270)#28
mishanefedov merged 1 commit into
mainfrom
aur-270-yield-views

Conversation

@mishanefedov
Copy link
Copy Markdown
Owner

Linear: AUR-270

Summary

Visualizes the git-correlation $/commit + $/line endpoints landed in AUR-265.

`/sessions/:id/yield`

  • Commits-in-window table — hash · author/date · subject · files · +/− with a bold totals row.
  • Five callout stats: cost, commits, lines changed, $/commit, $/line.
  • Empty state when the session burned dollars but no commits landed in window.

`/projects/:name/yield`

  • Weekly composed chart: cost bars + commit-count bars + $/commit line overlay (right axis).
  • Sortable "spend without commit" session list — by cost / lines / files.
  • Repo path + four totals (weeks tracked, total cost, total commits, overall $/commit).

Failure modes

Both views handle the API's `ok: false` reasons gracefully — "no store", "session has no project tag", "project is not a git repo under WORKSPACE_ROOT" — with a one-line explainer of what yield needs to compute.

Wiring

Both pages lazy-loaded behind `Suspense`. Nav links surface from `Session.tsx` and `ProjectDetail.tsx`.

Acceptance criteria

  • `/sessions/:id/yield` renders commits table + totals + $/commit + $/line callouts.
  • `/projects/:name/yield` renders weekly $/commit chart + spend-without-commit list (cost-desc default).
  • Both handle `ok: false` cases gracefully.
  • Lazy-loaded.

Test plan

  • `npm run typecheck` — clean (server)
  • `web && npx tsc --noEmit` — clean for new files (one pre-existing `Logs.tsx` unused-var error left alone)
  • `npm test` — 369/369 pass
  • `npm run build` — server (tsup) + web (vite) both build

Visualizes the git-correlation $/commit + $/line endpoints (AUR-265).

- /sessions/:id/yield — commits-in-window table (hash, author, subject,
  files, +/-) with totals row, plus $/commit + $/line + cost +
  lines-changed callouts. Empty state when no commits landed during
  the session window.
- /projects/:name/yield — weekly composed chart (cost bars + commit
  bars + $/commit line overlay), plus a sortable 'spend without commit'
  session list (cost / lines / files). Sortable column buttons.

Both views handle the API's ok:false reasons (no store, no project tag,
not a git repo under WORKSPACE_ROOT) with a helpful explainer.

Lazy-loaded behind Suspense in main.tsx; nav links from Session.tsx
and ProjectDetail.tsx.

Full suite 369/369; typecheck clean (one pre-existing Logs.tsx unused
var unrelated to this PR).
@mishanefedov mishanefedov merged commit 664bfae into main May 4, 2026
3 checks passed
@mishanefedov mishanefedov deleted the aur-270-yield-views branch May 4, 2026 09:26
mishanefedov added a commit that referenced this pull request May 25, 2026
Visualizes the git-correlation $/commit + $/line endpoints (AUR-265).

- /sessions/:id/yield — commits-in-window table (hash, author, subject,
  files, +/-) with totals row, plus $/commit + $/line + cost +
  lines-changed callouts. Empty state when no commits landed during
  the session window.
- /projects/:name/yield — weekly composed chart (cost bars + commit
  bars + $/commit line overlay), plus a sortable 'spend without commit'
  session list (cost / lines / files). Sortable column buttons.

Both views handle the API's ok:false reasons (no store, no project tag,
not a git repo under WORKSPACE_ROOT) with a helpful explainer.

Lazy-loaded behind Suspense in main.tsx; nav links from Session.tsx
and ProjectDetail.tsx.

Full suite 369/369; typecheck clean (one pre-existing Logs.tsx unused
var unrelated to this PR).
mishanefedov added a commit that referenced this pull request May 25, 2026
Visualizes the git-correlation $/commit + $/line endpoints (AUR-265).

- /sessions/:id/yield — commits-in-window table (hash, author, subject,
  files, +/-) with totals row, plus $/commit + $/line + cost +
  lines-changed callouts. Empty state when no commits landed during
  the session window.
- /projects/:name/yield — weekly composed chart (cost bars + commit
  bars + $/commit line overlay), plus a sortable 'spend without commit'
  session list (cost / lines / files). Sortable column buttons.

Both views handle the API's ok:false reasons (no store, no project tag,
not a git repo under WORKSPACE_ROOT) with a helpful explainer.

Lazy-loaded behind Suspense in main.tsx; nav links from Session.tsx
and ProjectDetail.tsx.

Full suite 369/369; typecheck clean (one pre-existing Logs.tsx unused
var unrelated to this PR).
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.

1 participant