feat(ui): show history commit metadata in reviews - #1016
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds history-selected commit metadata to the review-info pane, preserves it across matching reloads, exposes clipboard copying to extension panes, and aligns related theme and selection styling.
Confidence Score: 4/5The PR should not merge until the review-info copy control is backed by the full immutable revision rather than the abbreviated display ID. History rows distinguish the immutable revision from its abbreviated display form, but the new descriptor stores and copies the display form; timestamp validation also accepts some impossible calendar dates. Files Needing Attention: packages/hunk/src/ui/session/HunkSessionHost.tsx, packages/hunk/src/core/reviewDescriptor.ts Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
H[Interactive history row] -->|open review| D[Build commit descriptor]
D --> B[AppBootstrap.review]
B --> P[Review-info pane]
B --> S[Session registration]
P --> T[Title, author, relative time]
P --> C[Copy revision through pane action]
C --> O[OSC 52 clipboard]
B --> R[Matching review reload]
R --> B
Prompt To Fix All With AI### Issue 1
packages/hunk/src/ui/session/HunkSessionHost.tsx:62
**Copies abbreviated revision**
When a user copies the revision from the new review-info panel, this descriptor supplies `displayId`, so the panel copies the abbreviated Git or Jujutsu identifier. The existing history action instead copies the full immutable `revisionId`. An abbreviated identifier can become ambiguous when pasted into another command. Store the full revision in the descriptor and truncate it only for display.
```suggestion
revision: outcome.commit.revisionId,
```
### Issue 2
packages/hunk/src/core/reviewDescriptor.ts:137-138
**Accepts impossible timestamps**
The new validator accepts ISO-shaped but impossible dates such as `2026-02-31T00:00:00Z`: the regular expression accepts the shape, and `Date.parse` normalizes the value instead of returning `NaN`. The UI can therefore show a relative time for a different date than the provider supplied. Validate that the parsed calendar components match the original timestamp.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(ui): show history commit metadata i..." | Re-trigger Greptile |
2e008cd to
c2a2473
Compare
Summary
Validation
bun run typecheckbun run lintbun run deps:checkbun run testbun run test:integrationbun run test:tty-smokegit diff --checkThe PTY coverage verifies the metadata panel in a real interactive
hunk logreview flow. No visual attachment is included.This PR description was generated by Pi using gpt-5.6-sol