Files
backnotprop__plannotator/packages/review-editor/tsconfig.json
Michael Ramos 58f87500f1 Migrate packages/review-editor to Base UI (#1014)
* refactor(review-editor): migrate tour QA checkbox to Base UI

First component of the Radix→Base UI migration (internal package).
@base-ui/react added alongside Radix; Radix deps removed in the final
commit. Root typecheck, bun test (1955 pass), build:review all green.

Note: bun.lock also absorbs pre-existing manifest drift (the committed
lock was stale relative to several package.jsons at HEAD — any install
regenerates it identically).

* chore(review-editor): give the package its own typecheck gate

The package had no tsconfig and is absent from the root typecheck
chain (it is typechecked only through apps/review, whose own tsc run
is broken for unrelated reasons: it never declares @types/react).
Adds a package tsconfig modeled on apps/review's compilerOptions plus
@types/react(-dom) devDeps so migration transforms are type-verified.
53 pre-existing errors surfaced (import.meta.env, response-type
mismatches) — recorded, untouched; gate for the migration is zero
errors in migrated files.

* refactor(review-editor): migrate all 7 popover files to Base UI

Portal>Content becomes Portal>Positioner>Popup (positioning props and
z-index on Positioner), asChild triggers become render props, state
classes move to Base UI presence attributes (data-popup-open on
triggers), --radix-* vars become --transform-origin, and keyframe
enter animations restate as data-starting/ending-style transitions.
Focus interception (onOpenAutoFocus) maps to Popup initialFocus,
including WorktreePicker's conditional search-input focus.

Flagged, not patched: collision defaults differ slightly at viewport
edges; exit fade now animates where Radix unmounted instantly. See
.migration/popover.md. Tests (1955) and build:review green; zero tsc
errors in migrated files.

* refactor(review-editor): migrate DiffTypePicker to Base UI Menu

Radix DropdownMenu is renamed Menu in Base UI; same restructure as the
popovers (Positioner/Popup split, render triggers, --anchor-width for
trigger-width matching). Item onSelect becomes onClick. Flagged: focus
loop now wraps by default (Base UI default). See
.migration/dropdown-menu.md.

* refactor(review-editor): migrate FileTreeNode context menu to Base UI

Same menu anatomy via @base-ui/react/context-menu (which re-exports
Menu's Positioner/Popup/Item parts). Row button keeps left-click
select / double-click open; items switch onSelect→onClick. See
.migration/context-menu.md for the hand-verify checklist — this is
the file tree's core interaction.

* refactor(review-editor): drop all Radix deps, finish Base UI migration

Removes the 7 @radix-ui/* dependencies — three of them (collapsible,
dialog, tooltip) were never imported anywhere and go without a code
change. Also fixes two keyboard-nav guards in FileTree/SectionsPanel
that matched Radix's [data-radix-popper-content-wrapper] portal
attribute (Base UI popups carry ARIA roles directly, so the role
selectors already cover every floating surface — verified against the
shipped popup implementations).

Zero radix references remain in the package (deps, imports, class
strings, CSS vars, DOM selectors). Root typecheck, 1955 tests, and
build:review all green. packages/ui untouched. Full summary in
.migration/project.md.

* fix(review-editor): initialFocus fallback semantics in pickers

Self-review catch: Base UI's initialFocus function form treats a
returned undefined as 'do nothing' (focus stays on the trigger) while
null falls back to the default focus. The '?? undefined' I introduced
would strand focus on the trigger for short worktree lists — the exact
arrow-keys-leak-to-file-tree bug the original Radix code's comment
warned about. Returning searchRef.current directly (element or null)
matches the original semantics. Also corrects the popover report and
adds a Tooltip-prop coordination note for the parallel ui migration.

* docs(review-editor): record automated QA results in migration reports

Playwright pass against the demo review session: context menu (full
flow incl. real clipboard), tour checkboxes (all three toggle paths,
incl. the span+hidden-input label association), diff-options popover,
and DOM invariants (roles, data-popup-open, no data-state on migrated
primitives) all pass. Demo mode never populates gitContext, so the
diff-type dropdown and worktree/base pickers don't mount there —
their checks remain on the manual list against a real session.

* docs(review-editor): annotate QA checklist items untestable from the standalone entrypoint

* chore: regenerate bun.lock after rebase onto Base UI ui migration
2026-07-07 12:42:41 -07:00

17 lines
399 B
JSON

{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"moduleResolution": "bundler",
"isolatedModules": true,
"moduleDetection": "force",
"jsx": "react-jsx",
"allowImportingTsExtensions": true,
"noEmit": true
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}