feat(dashboard): Git panel with repo status/log + auto-open Git and folder tabs - #1636
Conversation
|
🤖 Kiro Crew [operator: bolichen97]: This PR has been inactive for 7+ days with failing CI. I've assessed the blockers and they appear resolvable — I'll rebase, fix the CI issues, and address any straightforward review comments. I will NOT change your design approach. Assessment: Merge conflicts with main + If you'd prefer I don't touch this PR, add the |
07e8850 to
de68b42
Compare
|
🤖 Kiro Crew [operator: bolichen97] Rebased onto current main ( Conflict resolution (rebase)
CI-failure fixes
Review-pass fixes (GPT 5.6 + Opus 4.8 local mirror, then verified)
Verified: isort/flake8/mypy clean, full backend pytest (49,771 passed; 107 failures reproduced on pristine main — environment-only), |
|
Local pre-push review pass on prior SHA
Opus advisories: duplicate React keys (fixed, |
de68b42 to
5d55fa2
Compare
|
🤖 Kiro Crew [operator: bolichen97] Iteration 2 (
Local verification: spawn audit 9/9, ja/ko style + catalog parity 120/120. |
5d55fa2 to
0962766
Compare
|
🤖 Kiro Crew [operator: bolichen97] Iteration 3 (
Verified: |
02ac53d to
ad4176c
Compare
|
🤖 Kiro Crew [operator: bolichen97] Iteration 7 ( Dispositions for the GPT review of
Local gates: 30/30 across the three contract suites (5 new regression tests), isort/flake8/mypy clean. |
ad4176c to
ee495a0
Compare
|
🤖 Kiro Crew [operator: bolichen97] Iteration 8 ( |
…older tabs when project is set
When a session's project directory is a git repository, the side panel now
auto-opens a Git view (branch, ahead/behind, uncommitted changes with +/-
line counts, recent commits) and the existing folder tab for the project
dir - once per slot+path, so a user who closes them is not re-forced.
Backend: GET /api/project/git/status and GET /api/project/git/log, following
the existing /api/project/git security pattern (known-project allow-list,
sensitive-path guard, SEL audit, sandboxed git env, asyncio.to_thread).
Frontend: new GitPanel component rendered via ActivityViewer ('git' view
kind), pinned menu entry, auto-open effects in ChatPage.
ee495a0 to
469c747
Compare
|
🤖 Kiro Crew [operator: bolichen97] Iteration 9 (
Local gates: 31/31 across the three contract suites (1 new regression test), isort/flake8/mypy clean. |
|
🤖 Kiro Crew [operator: bolichen97] Review-ready at Dispositions for the two advisory CONCERNS verdicts (both center on the same design point):
Summary of what this drive-to-green added on top of the original contribution (all explained in prior comments): rebase across 4 main evolutions (grouped side-panel menu, route-table slices, ja/ko locales, error-code contract), OS-sandboxed + bounded + redacted git execution with filter-driver refusal, TOCTOU crash guard, porcelain quoting/rename parsing fixes, quota-loop and cross-project file-open fixes in the frontend, SEL audit coverage, and 11 new regression tests. Awaiting human review and merge. |
Problem
When a session's project directory is set to a git repository, there is no way to see the repo's git state in the dashboard. The existing "Changes" panel shows PR links the agent mentioned, and the session file list shows files the agent touched - neither shows the repository's actual branch, uncommitted changes, or history. To know the git state of the folder they are working in, users must drop to a terminal.
Why it matters
Developing against a specific folder without visible git context means users start work on the wrong branch, miss uncommitted changes left by a previous session, and cannot sanity-check what the agent changed against the real working tree. Surfacing the repo state at a glance, automatically when the folder is opened, removes a constant context switch.
Fix (symptoms -> root cause -> change)
Symptom: no git visibility. Root cause: the dashboard has no endpoint exposing working-tree status/history, and no side-panel view bound to the session's project dir. Change:
/api/project/git, following its exact security pattern (known-project allow-list,is_sensitive_pathguard, SEL audit, sandboxed git env with textconv/fsmonitor disabled,asyncio.to_thread, per-call timeouts):GET /api/project/git/status- branch, ahead/behind, per-file status with +/- line counts (git status --porcelain=v1 -b+git diff --numstat HEAD), file list capped at 500 with atruncatedflag.GET /api/project/git/log?limit=N- recent commits (sha, subject, author, ISO date, HEAD marker), limit clamped 1-100.GitPanelcomponent (branch header, ahead/behind pill, uncommitted-count pill, CHANGES section with status letters and +/- counts opening the existing diff viewer, COMMITS section) rendered throughActivityVieweras a new'git'view kind, with a "+" menu entry. Status polls every 5s while visible; log refetches on branch change. All strings go through the i18n catalog (translated in all 10 locales, pseudo-locale regenerated, context-sidecar entries for the short "Git" strings).ChatPageopens the Git view and the existing folder tab once per slot+path (localStorage marker), and expands the activity panel. Users who close them are not re-forced.Tests
test/test_project_git_status_log.py(10 cases): non-repo dir, unknown dir refused by the allow-list, staged+unstaged+untracked classification, clean repo, numstat merge, log content, limit clamping.website/src/test/usePanelTabs.test.ts(+2):'git'view kind registration and closability.website/src/test/gitPanelAutoOpen.test.ts(5): once-per-slot+path auto-open marker logic.Manual verification
Ran the full stack from source (gateway on an isolated dev home + built frontend), set a project dir on a slot via the API, and drove the UI headless: both tabs auto-open, the Git panel renders branch/changes/commits from the real repo, the folder tab shows the project tree. Screenshots below are from that run.
Gates:
isort/flake8/mypy(same findings asorigin/main, none in touched files),npm --prefix website run buildclean, vitest 699/699 files passing (electron suite fails identically onorigin/mainon Linux - macOS contracts).Screenshots
Git panel (auto-opened, populated from this branch's own working tree):
Folder tab auto-opened for the project dir: