Skip to content

refactor(ui): isolate extension workspace controls - #862

Merged
benvinegar merged 2 commits into
mainfrom
refactor/extension-workspace-controls
Aug 27, 2026
Merged

refactor(ui): isolate extension workspace controls#862
benvinegar merged 2 commits into
mainfrom
refactor/extension-workspace-controls

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

  • extract host-mediated extension workspace reads and writes into a focused controller hook
  • keep extension command-context composition in App while preserving live inputs, lease retirement, write verification, and reconciliation
  • add focused controller lifecycle and read/write coverage

Testing

  • bun test src/ui/hooks/useExtensionWorkspaceControls.test.tsx src/ui/App.extension-command-controls.test.tsx src/ui/AppHost.workspace.test.tsx
  • bun run typecheck
  • bun run deps:check
  • bun run lint
  • bun run format:check

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

@vercel

vercel Bot commented Aug 26, 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 26, 2026 11:36pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR extracts extension workspace read/write orchestration from App into a focused controller hook while preserving live inputs, capability retirement, consent, target verification, write tracking, and reconciliation.

  • Adds focused lifecycle and read/write coverage for the new controller.
  • Updates App and AppHost to consume the extracted controller types and factory.
  • No actionable regressions were identified.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, lifecycle, or security regression identified.

The extraction preserves the prior callback dependencies and live-input semantics, while focused tests cover authority retirement, target verification, write outcomes, and review reconciliation.

Important Files Changed

Filename Overview
src/ui/hooks/useExtensionWorkspaceControls.ts Extracts the existing workspace-control flow into a stable hook without changing its authority, verification, write, or reconciliation behavior.
src/ui/App.tsx Replaces inline workspace orchestration with the controller while preserving command-context composition and dependencies.
src/ui/AppHost.tsx Updates workspace type imports without changing host lifecycle or write coordination.
src/ui/hooks/useExtensionWorkspaceControls.test.tsx Adds comprehensive tests for reads, live inputs, lease retirement, consent, verification, failures, shutdown, and reconciliation.
src/ui/AppHost.workspace.test.tsx Adjusts the extracted writer type import while retaining end-to-end workspace coverage.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Command[Extension command] --> Context[App command context]
  Context --> Controller[Workspace controls controller]
  Controller --> Lease[Validate capability lease]
  Lease --> Target[Resolve reviewed file target]
  Target --> Verify1[Verify filesystem target]
  Verify1 --> Consent[Attributed confirmation]
  Consent --> Verify2[Reverify filesystem target]
  Verify2 --> Runner[Host write runner]
  Runner --> Write[Write reviewed file]
  Write --> Refresh[Reconcile mounted review]
Loading

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

@benvinegar
benvinegar merged commit 8b2ab50 into main Aug 27, 2026
12 checks passed
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