refactor(ui): commit extension runtime authority - #891
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR extracts extension command execution, event-context publication, and committed runtime authority from
Confidence Score: 4/5The runtime refactor appears safe to merge after the non-blocking filename convention violations are corrected. The lifecycle and authority changes are guarded by commit-time effects and capability leases with focused regression coverage; the only accepted issue is that several new TypeScript filenames do not follow the repository's enforced naming convention. Files Needing Attention: src/ui/hooks/useExtensionRuntimeBridge.ts and the other newly added camelCase/PascalCase TypeScript files Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Render[App render] --> Bridge[Extension runtime bridge]
Bridge -->|layout commit| Facts[Commit registry, review, and selection facts]
Facts --> Bindings[Commit commands and navigation]
Bindings --> Provider[Install event-context provider]
Provider --> Events[AppHost publishes lifecycle events]
Bridge --> Commands[Extension command runner]
Commands --> Snapshot[Frozen selection and review controls]
Commands --> Live[Live committed navigation]
Reload[Reload or registry replacement] --> Revoke[Revoke predecessor leases]
Revoke --> Bridge
Prompt To Fix All With AI### Issue 1
src/ui/hooks/useExtensionRuntimeBridge.ts:1
**Use dash-case TypeScript filenames**
This file and the other newly added hook and test files use camelCase or PascalCase filename segments, violating the repository's enforced dash-case convention and causing filename-case lint failures. Rename them to dash-case and update their imports.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "test(ui): distinguish committed navigati..." | Re-trigger Greptile |
| @@ -0,0 +1,264 @@ | |||
| /** | |||
There was a problem hiding this comment.
Use dash-case TypeScript filenames
This file and the other newly added hook and test files use camelCase or PascalCase filename segments, violating the repository's enforced dash-case convention and causing filename-case lint failures. Rename them to dash-case and update their imports.
Context Used: guidelines.mdc Cursor rule (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ui/hooks/useExtensionRuntimeBridge.ts
Line: 1
Comment:
**Use dash-case TypeScript filenames**
This file and the other newly added hook and test files use camelCase or PascalCase filename segments, violating the repository's enforced dash-case convention and causing filename-case lint failures. Rename them to dash-case and update their imports.
**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
mainAppTest-first regression
Before applying the implementation, the new App-level regression reproduced both leaks on fresh main:
eventContextProviderinstalledThe red run was 0/2; both tests pass with this extraction. A separate focused assertion now proves navigation uses successor committed callbacks rather than a captured predecessor.
Validation
bun run typecheckbun run deps:checkbun run format:checkbun run lintThis includes an empty maintenance changeset.
This PR description was generated by Pi using gpt-5.6-sol