Skip to content

feat(extensions): support guided review workflows - #717

Open
mikeclarke wants to merge 1 commit into
mainfrom
feat/guided-extension-workflows
Open

feat(extensions): support guided review workflows#717
mikeclarke wants to merge 1 commit into
mainfrom
feat/guided-extension-workflows

Conversation

@mikeclarke

Copy link
Copy Markdown
Member

Summary

  • add transient session preferences for guided and demo extensions
  • expose named command execution, navigation, and native dialogs to lifecycle handlers
  • retain extension attribution while presenting bundled dialogs with native styling
  • document and test the guided-workflow extension surface

Testing

  • bun run typecheck
  • bun run lint
  • bun run check:docs
  • bun test

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hunk-web Ready Ready Preview Aug 12, 2026 6:29pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR expands the extension API for guided review workflows.

  • Adds transient session preferences, command-execution events, and lifecycle navigation/dialog controls.
  • Adds bundled-dialog attribution policy and body wrapping.
  • Updates extension documentation and associated registry, event, and interaction tests.

Confidence Score: 4/5

The PR appears safe to merge after addressing the non-blocking style and dialog-rendering test coverage issues.

The reviewed runtime paths have no established blocking failure, but the changed dialog geometry lacks direct component coverage and several additions violate the repository’s required quote style.

Files Needing Attention: src/extensions/runExtension.ts, src/extensions/events.ts, src/ui/App.tsx, src/ui/components/chrome/ExtensionDialog.tsx

Important Files Changed

Filename Overview
src/extension-api/types.ts Adds the public session options, command event, and event-context navigation/dialog contracts.
src/extensions/runExtension.ts Implements validated session-option registration and rollback integration; newly added literals violate the mounted style rule.
src/extensions/events.ts Supplies safe pre-mount navigation and dialog fallbacks for lifecycle and bus handlers.
src/ui/App.tsx Installs live event controls, transient quit behavior, bundled attribution policy, and command execution observation.
src/ui/components/chrome/ExtensionDialog.tsx Adds body wrapping and conditional attribution layout, but lacks a component-level regression test for the new geometry.
src/ui/lib/extensionDialogs.ts Propagates host-controlled attribution policy through queued confirm, select, and input requests.

Sequence Diagram

sequenceDiagram
  participant E as Extension
  participant R as Extension Registry
  participant A as App
  participant U as User
  E->>R: configureSession / register handlers
  A->>R: resolve session options and event context
  U->>A: execute named command
  A->>E: command_executed(commandId)
  E->>A: dialogs.confirm/select/input
  A->>U: native attributed dialog
  E->>A: navigation.selectFile/selectHunk
Loading
Prompt To Fix All With AI
### Issue 1
src/extensions/runExtension.ts:331
**Inconsistent TypeScript quote style**

New TypeScript code uses double-quoted string literals across several changed runtime files, diverging from the repository's required single-quote style and establishing an inconsistent pattern for subsequent changes.

### Issue 2
src/ui/components/chrome/ExtensionDialog.tsx:92-101
**Dialog geometry lacks coverage**

The dialog now derives rendered rows and modal height from body wrapping and attribution state, but the added tests only verify queued data. Without a component-level regression test, clipping, height, and attribution-spacing regressions can pass unnoticed.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(extensions): support guided review ..." | Re-trigger Greptile

apiVersion: HUNK_EXTENSION_API_VERSION,
config,
events,
configureSession(options: ExtensionSessionOptions) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Inconsistent TypeScript quote style

New TypeScript code uses double-quoted string literals across several changed runtime files, diverging from the repository's required single-quote style and establishing an inconsistent pattern for subsequent changes.

Context Used: guidelines.mdc Cursor rule (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/extensions/runExtension.ts
Line: 331

Comment:
**Inconsistent TypeScript quote style**

New TypeScript code uses double-quoted string literals across several changed runtime files, diverging from the repository's required single-quote style and establishing an inconsistent pattern for subsequent changes.

**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!

Comment on lines +92 to 101
const wrappedBodyLines = request.bodyLines.flatMap((line) => wrapText(line, bodyWidth));
const attributionRows = request.showAttribution ? 1 : 0;
const attributionGapRows = request.showAttribution && wrappedBodyLines.length > 0 ? 1 : 0;

return (
<ConfirmDialog
actions={[
{ keyLabel: "enter/y", label: request.confirmLabel, run: onAccept },
{ keyLabel: "esc/n", label: request.cancelLabel, run: onCancel },
]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Dialog geometry lacks coverage

The dialog now derives rendered rows and modal height from body wrapping and attribution state, but the added tests only verify queued data. Without a component-level regression test, clipping, height, and attribution-spacing regressions can pass unnoticed.

Context Used: testing.mdc Cursor rule (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ui/components/chrome/ExtensionDialog.tsx
Line: 92-101

Comment:
**Dialog geometry lacks coverage**

The dialog now derives rendered rows and modal height from body wrapping and attribution state, but the added tests only verify queued data. Without a component-level regression test, clipping, height, and attribution-spacing regressions can pass unnoticed.

**Context Used:** testing.mdc Cursor rule ([source](https://github.com/modem-dev/modem/blob/main/.cursor/rules/testing.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!

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