Skip to content

refactor(ui): centralize extension review events - #879

Open
benvinegar wants to merge 4 commits into
refactor/extension-trust-controllerfrom
refactor/extension-review-events
Open

refactor(ui): centralize extension review events#879
benvinegar wants to merge 4 commits into
refactor/extension-trust-controllerfrom
refactor/extension-review-events

Conversation

@benvinegar

@benvinegar benvinegar commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • publish extension review events through useExtensionReviewEvents
  • preserve selection debouncing, file-view identity, event ordering, and initial filter, layout, and theme suppression
  • prevent delayed callbacks from publishing to replaced or unmounted extension runtimes

Testing

  • focused event publisher, lifecycle, StrictMode, and stale-timer tests
  • relevant AppHost, command-authority, note-composer, and interaction tests
  • PTY extension integration tests
  • bun run typecheck
  • bun run deps:check
  • bun run lint
  • targeted formatting and diff checks

Stack

This PR description was generated by Pi using GPT-5.6 Sol

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hunk-web Ignored Ignored Preview Aug 27, 2026 12:32pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR centralizes extension-facing review event publication in a dedicated hook while preserving debounce, initial-suppression, and runtime-retirement behavior.

  • Moves selection, file-view, filter, layout, and theme effects out of App.
  • Exposes stable publishers for watch, note, and command events.
  • Adds focused coverage for runtime replacement, stale timers, soft reloads, unmounting, and StrictMode replay.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified.

The refactor preserves existing event semantics while explicitly guarding delayed work across extension-runtime replacement and covering the relevant lifecycle behavior with focused tests.

Important Files Changed

Filename Overview
src/ui/hooks/useExtensionReviewEvents.ts Centralizes declarative and imperative extension review events with registry-aware baselines and stale-work retirement.
src/ui/App.tsx Replaces inline extension event effects and callback wrappers with the centralized hook.
src/ui/hooks/useExtensionReviewEvents.test.tsx Thoroughly exercises debounce, replacement, suppression, callback routing, unmount, and StrictMode behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  App[App review state and actions] --> Hook[useExtensionReviewEvents]
  Hook --> Declarative[Debounced and projected events]
  Hook --> Imperative[Stable action publishers]
  Declarative --> Runtime[Current extension runtime]
  Imperative --> Runtime
  Runtime --> Handlers[Extension event handlers]
Loading

Reviews (1): Last reviewed commit: "refactor(ui): centralize extension revie..." | Re-trigger Greptile

@benvinegar
benvinegar force-pushed the refactor/extension-review-events branch from 60abc10 to 38f537a Compare August 27, 2026 04:27
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