Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Rebased onto current main (
Local verification: clean Git checkout full suite 4,317 pass / 13 skip; PTY 183 pass / 1 skip; TTY 11 pass; packaging, typecheck and dependency checks pass. Native Windows verification is pending the new CI run. The original JJ-colocated checkout’s three cwd-sensitive failures also reproduce on fetched main. This comment was generated by Pi using GPT-6 Astra |
6c2d03a to
87d7433
Compare
753f5cb to
33ec7e7
Compare
|
| const index = selected === null ? -1 : (geometry.navigationIndex.get(selected) ?? -1); | ||
| const next = | ||
| geometry.navigable[Math.max(0, Math.min(geometry.navigable.length - 1, index + delta))]?.id ?? | ||
| null; | ||
| return { selected: next, top: statusViewportTop(geometry, next, top, height) }; |
There was a problem hiding this comment.
Trailing status messages stay hidden
In a short terminal, arrow keys and the mouse wheel cannot scroll past the last selectable file or worktree. measureStatusRows excludes headings from navigation, so sibling errors and remaining-worktree notices below that row can stay hidden. Allow scrolling past the last selectable row without forcing the viewport back to it.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk/src/ui/status/geometry.ts
Line: 269-273
Comment:
**Trailing status messages stay hidden**
In a short terminal, arrow keys and the mouse wheel cannot scroll past the last selectable file or worktree. `measureStatusRows` excludes headings from navigation, so sibling errors and remaining-worktree notices below that row can stay hidden. Allow scrolling past the last selectable row without forcing the viewport back to it.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| const result = await runAbortableCommand([context.gitExecutable, ...args], { | ||
| cwd: context.cwd, | ||
| signal: context.signal, | ||
| env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }, |
There was a problem hiding this comment.
Environment reads bypass required boundary
The new Git status reader copies process.env directly. The supplied guide forbids direct access and requires packages to receive environment values from their callers. Pass the environment through the status context instead. This also occurs in loadStatusBootstrap, StatusApp, and other new status code. This repository requirement must be satisfied before merging.
Context Used: guidelines.mdc Cursor rule (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk-git/src/status.ts
Line: 187
Comment:
**Environment reads bypass required boundary**
The new Git status reader copies `process.env` directly. The supplied guide forbids direct access and requires packages to receive environment values from their callers. Pass the environment through the status context instead. This also occurs in `loadStatusBootstrap`, `StatusApp`, and other new status code. This repository requirement must be satisfied before merging.
**Context Used:** guidelines.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/guidelines.mdc))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| @@ -0,0 +1,552 @@ | |||
| import { useKeyboard, useTerminalDimensions } from "@opentui/react"; | |||
There was a problem hiding this comment.
New filenames violate naming rule
The new StatusApp.tsx filename violates the supplied guide’s requirement to use dash-case for TypeScript files. Rename it and update its imports. statusBootstrap.ts and runInteractiveStatus.tsx have the same issue, with further instances among the added files. This repository requirement must be satisfied before merging.
Context Used: guidelines.mdc Cursor rule (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk/src/ui/status/StatusApp.tsx
Line: 1
Comment:
**New filenames violate naming rule**
The new `StatusApp.tsx` filename violates the supplied guide’s requirement to use dash-case for TypeScript files. Rename it and update its imports. `statusBootstrap.ts` and `runInteractiveStatus.tsx` have the same issue, with further instances among the added files. This repository requirement must be satisfied before merging.
**Context Used:** guidelines.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/guidelines.mdc))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| const result = await runAbortableCommand([context.gitExecutable, ...args], { | ||
| cwd: context.cwd, | ||
| signal: context.signal, | ||
| env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }, | ||
| maxOutputBytes: MAX_OUTPUT_BYTES, | ||
| timeoutMs: QUERY_TIMEOUT_MS, | ||
| strictUtf8: true, |
There was a problem hiding this comment.
Indentation violates formatting rule
The added code uses two-space indentation, but the supplied guide requires four spaces. Update the new code to meet that requirement before merging. The repository-specific exception permits double-quoted strings; it does not waive the indentation requirement.
Context Used: guidelines.mdc Cursor rule (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk-git/src/status.ts
Line: 184-190
Comment:
**Indentation violates formatting rule**
The added code uses two-space indentation, but the supplied guide requires four spaces. Update the new code to meet that requirement before merging. The repository-specific exception permits double-quoted strings; it does not waive the indentation requirement.
**Context Used:** guidelines.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/guidelines.mdc))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| status: { | ||
| path: "status", | ||
| summary: "inspect the current workspace and sibling worktrees", | ||
| synopsis: ["hunk status [--static | --json]"], |
There was a problem hiding this comment.
Status adoption is not measured
The new user-facing status command has no adoption metrics. The supplied guide requires them when a change affects what users see or experience. Add a way to measure use of this command under the project’s metrics policy. This repository requirement must be satisfied before merging.
Context Used: guidelines.mdc Cursor rule (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/hunk/src/app/cli.ts
Line: 260-263
Comment:
**Status adoption is not measured**
The new user-facing `status` command has no adoption metrics. The supplied guide requires them when a change affects what users see or experience. Add a way to measure use of this command under the project’s metrics policy. This repository requirement must be satisfied before merging.
**Context Used:** guidelines.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/guidelines.mdc))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Add
hunk status: a read-only workspace overview that makes current changes and sibling worktrees understandable without leaving the terminal.This is intentionally a draft for product/UX review. It adds one view—not staging controls, an agent dashboard, another diff renderer, or a repository manager. Log/Quit shortcuts are absent from the main action strip; existing keyboard/menu commands remain.
Architecture
Git implements an optional renderer-free
ExtensionVcsAdapter.statuscapability, with bounded cancellable reads and separate current/sibling refreshes. This belongs alongside the existing provider-owned history capability: extensions supply VCS facts while the host retains terminal routing, trust, themes, and lifecycle ownership. No parallel review semantics or broker protocol.Rebased onto
3fbb223e; extension API 26 follows main's API 25 asynchronous watch signatures. Includes docs/help and a minor Changeset. CI fixes synchronize the tracked package README and canonicalize worktree filesystem identities, with alias/junction regressions included in Windows coverage.Visual evidence
Real source TUI captured in a Linux PTY through
test/pty/harness.tsand the term-video keyframer/tuistory/ghostty renderer—not a mockup. Synthetic Git fixture: 11 tracked changes, 11 untracked files, and one linked sibling.status --no-extensions --theme nord --color alwaysCapture and behavior notes
Verification
Latest update:
87d7433aRebased onto
3fbb223e. Local validation passes packaging, typecheck/dependencies, 183 PTY tests (1 platform skip), and 11 TTY tests. A clean Git candidate checkout passes the full suite: 4,317 pass / 13 skip / 0 fail. The three cwd-dependent failures in the original JJ-colocated checkout also reproduce against fetched main; its same 62 relevant tests pass from a plain Git checkout. Native Windows results are being verified in the current remote CI run; see the latest rebase comment for details.Earlier validation before this update
Post-rebase checks used the installed Bun 1.4.2 executable explicitly; both default-suite shard headers confirm that version. Equivalent commands below use
$BUNfor/home/bentlegen/.local/share/mise/installs/bun/1.4.2/bin/bunand prepend its directory to PATH.$BUN run typecheck— pass.$BUN run deps:check— pass, 486 modules / 1,999 edges.$BUN scripts/generate/generate-docs.ts --check— pass.$BUN scripts/test/run-test-suite.ts --group=integration— 175 pass / 1 platform skip.HUNK_RUN_TTY_SMOKE=1 $BUN test ./test/smoke— 11 pass, including a real two-file diff entered via status and terminal restoration.$BUN test ./test/review-conformance— 118 pass.$BUN scripts/test/test-session-broker-node.ts— 4 pass.$BUN scripts/test/run-test-suite.ts— 4,258 pass / 13 skip / 3 failures; not a green full-suite result.git diff --check— pass.The three failures expect Git but this colocated checkout detects JJ:
resolveSessionVcsId > falls back to detection and reports an id nothing ownsloadConfiguredSessionBootstrap > shares extension-aware loading and session fields across launch and reload callersregisterVcsAdapter with junk > a detect() that throws does not stop other adapters being consultedBefore rebase, these were reproduced using pristine pre-feature
94b71186sources fromgit archive HEAD, with dependencies linked and the original checkout cwd retained:Result: 59 pass / the same 3 failures. Running both baseline and working sources from a temporary Git-only cwd produced 62 pass / 0 fail each. The assertions were not weakened; post-rebase failures have the same identities and mismatch.
Independent reviews covered provider correctness, routing/cleanup, shared state, refresh races, and the final grouped UX. Findings were fixed and rechecked; the rebase preserves main's direct-review metadata and reran the gates above.
Limits
--vcs gitexplicitly when appropriate.FETCH_HEADmtime cannot attest when the configured upstream was fetched. JSON retains qualified provenance.This PR description was generated by Pi using GPT-6 Astra