feat(tutor): teach Hunk inside an interactive review - #718
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThe PR adds a bundled
Confidence Score: 4/5The editor lesson should be fixed before merging because it can open a real working-directory file whose path collides with a synthetic tutor lesson. The tutor otherwise follows the existing startup and extension pipelines, but its editor exercise dispatches the normal host command before adding its explanatory notification, so a matching real path escapes the synthetic-review boundary. Files Needing Attention: src/extensions/default/ui/tutor/index.tsx Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant CLI as CLI/config
participant S as Startup
participant T as Tutor extension
participant A as AppHost
U->>CLI: hunk tutor
CLI->>S: Tutor input + effective preferences
S->>T: Install bundled tutor
S->>A: Synthetic changeset + extension registry
A->>T: changeset_loaded / startup events
T-->>U: Guide pane and current keybinding
U->>A: Execute review command
A->>T: command_executed event
T-->>U: Advance lesson progress
Prompt To Fix All With AI### Issue 1
src/extensions/default/ui/tutor/index.tsx:130
**Synthetic editor path escapes tutorial**
If the working directory contains a real file whose relative path matches the selected synthetic lesson, this task invokes the normal `hunk.review.editSelectedFile` command before showing the tutor notification, causing `$EDITOR` to open unrelated project content from a tutorial documented as self-contained.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(tutor): teach Hunk inside an intera..." | Re-trigger Greptile |
| { | ||
| id: "editor", | ||
| commandId: "hunk.review.editSelectedFile", | ||
| label: "try the editor handoff; this tutorial has no real file", |
There was a problem hiding this comment.
Synthetic editor path escapes tutorial
If the working directory contains a real file whose relative path matches the selected synthetic lesson, this task invokes the normal hunk.review.editSelectedFile command before showing the tutor notification, causing $EDITOR to open unrelated project content from a tutorial documented as self-contained.
Knowledge Base Used: Extension System: API, Loading, and Host Integration
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/extensions/default/ui/tutor/index.tsx
Line: 130
Comment:
**Synthetic editor path escapes tutorial**
If the working directory contains a real file whose relative path matches the selected synthetic lesson, this task invokes the normal `hunk.review.editSelectedFile` command before showing the tutor notification, causing `$EDITOR` to open unrelated project content from a tutorial documented as self-contained.
**Knowledge Base Used:** [Extension System: API, Loading, and Host Integration](https://app.greptile.com/modem/-/custom-context/knowledge-base/modem-dev/hunk/-/docs/extension-system.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.c7ab419 to
3c683a6
Compare
Summary
hunk tutor, a safe synthetic multi-file review with six guided lessonsStack
Depends on #717.
Testing
bun run typecheckbun run lintbun run check:docsbun test src/app/startup.test.ts src/core/config.test.ts src/ui/AppHost.tutor.test.tsx src/tutor/content.test.ts test/pty/tutor.test.tshunk-tutor.mp4