Skip to content

refactor(gui): split Combos for react-doctor#467

Merged
Wibias merged 4 commits into
lidge-jun:devfrom
Wibias:fix/react-doctor-combos
Jul 26, 2026
Merged

refactor(gui): split Combos for react-doctor#467
Wibias merged 4 commits into
lidge-jun:devfrom
Wibias:fix/react-doctor-combos

Conversation

@Wibias

@Wibias Wibias commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split ComboWorkspace into focused panel/modal modules.
  • Apply react-doctor 0.9.1 fetch status checks, loading finally resets, and numeric input guards on the Combos surface.

Stack

Test plan

  • bun x tsc -b in gui/
  • Open Combos page: create/edit/delete combo, confirm save/error toasts still work

Summary by CodeRabbit

  • New Features

    • Added a streamlined combo workspace for creating, editing, and removing combo configurations.
    • Added strategy selection, effort settings, target management, drag-and-drop ordering, and provider/model filtering.
    • Added overview counts and attention indicators for combos requiring review.
    • Added confirmations for removal and unsaved changes.
  • Bug Fixes

    • Improved handling of unsuccessful or invalid save and removal responses.
  • Tests

    • Added coverage for unsaved-change navigation and stable target handling.

@coderabbitai

This comment was marked as outdated.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@lidge-jun

Copy link
Copy Markdown
Owner

🔒 Under maintainer review — detailed feedback incoming

@lidge-jun (maintainer) has this PR in an active review pass. Please do not merge, rebase, or
close it
until the detailed review lands; a full comment with specific file:line findings,
failure modes, and suggested fixes is being prepared.

This is a claim marker so two maintainers do not review or land the same PR at once. If you are a
maintainer and need this PR urgently, please reply here first instead of merging.

Baseline for this pass: dev is at bef0dfbe (yesterday's integration batch ebc62d1f plus
#458, #456, #391, #392, #463, #465). If this PR touches the same files, the upcoming review will
name the exact overlapping paths so you only have to rebase once.

No action needed from you until then. Thanks for the contribution and for your patience.

Review tracker: devlog/_plan/260726_pr_review_pass · marker posted by the maintainer review pass

@lidge-jun

Copy link
Copy Markdown
Owner

Thanks for splitting Combos — the extraction is a genuine readability win. Two things block merge, one of them a red CI job.

1. CI blocker — gui/src/combo-workspace-data.ts:117 changes the parser's output contract. parseComboList now attaches an enumerable clientKey to every parsed target, which breaks tests/combo-workspace-data.test.ts:83. This reproduces locally (16 pass, 1 fail) and fails on all three CI operating systems. Please decide deliberately whether clientKey belongs in the parsed view model: either keep the previous plain-object contract and derive stable keys in the component layer, or keep it and update the test to assert the stable-UI-key contract while also proving toPutBody never serializes clientKey upstream. Required CI has to be green before this can land.

2. gui/src/components/combo-workspace-add-modal.tsx:78 — backdrop dismissal was lost. Converting the add modal from a clickable overlay to a native <dialog> dropped outside-click dismissal. The old overlay closed on a click outside the card; the new full-screen dialog has neither a scrim nor a dialog-level click handler, which is also inconsistent with the remove and unsaved dialogs you extracted in the same PR. Add a scrim, or handle clicks where event.target === event.currentTarget, keeping the existing busy guard.

Overlap with dev: none. No touched path has changed on dev since c03ed0a3, and three-way merge inspection finds no conflict, so no rebase is needed. The blocker is the failing test, not the merge base.

Test gap: there is no rendered Combos interaction test covering create/edit/delete, unsaved-navigation protection, Escape and backdrop dismissal, target add/remove/reorder, or numeric input behavior. Given the size of this split, that coverage is what would make the refactor verifiably behavior-preserving.


Reviewed as part of a maintainer review pass against dev at bef0dfbe. Verification: exact head, fresh local bun run typecheck + bun run lint:gui (both pass) and the focused test suite (1 failure, reproduced on hosted CI across macOS/Linux/Windows).

@coderabbitai

This comment was marked as outdated.

Wibias added 2 commits July 26, 2026 03:02
Extract ComboWorkspace panels/modals and harden fetch/loading paths for the 0.9.1 doctor rules.
…missal

Keep UI-only clientKey in the parsed view model with contract tests that prove toPutBody strips it, and restore backdrop click dismissal on combo dialogs.
@Wibias
Wibias force-pushed the fix/react-doctor-combos branch from b332468 to 76a0fc1 Compare July 26, 2026 01:04
@Wibias

Wibias commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the review blockers on the latest push (76a0fc13):

  1. clientKey parser contract — kept the UI-only key on the parsed view model; updated tests/combo-workspace-data.test.ts to assert stable ct-* keys and uniqueness, and added an explicit toPutBody check that clientKey is never serialized upstream.
  2. Backdrop dismissal — remove/unsaved/add dialogs now dismiss when event.target === event.currentTarget (add modal keeps the busy guard via requestClose).
  3. Rebased onto dev — dropped the bundled fix(gui): react-doctor shared foundations #466 foundations commits now that fix(gui): react-doctor shared foundations #466 has merged (also clears the Codex note about token-storage landing via this Combos PR).

CodeRabbit had no actionable inline findings on this PR (rate-limit / empty incremental pass). The broader Combos interaction-test gap noted in review is still open if you want that as a follow-up.

Compute the next draft outside setState before notifying dirty changes, and cover edit/revert/unsaved navigation in a Strict Mode regression test.
coderabbitai[bot]

This comment was marked as resolved.

Add keyboard target reorder, clamp sticky/weight inputs, and locale-stable unsaved dialog test ids.
@Wibias
Wibias merged commit 5cb3a11 into lidge-jun:dev Jul 26, 2026
9 checks passed
lidge-jun added a commit that referenced this pull request Jul 26, 2026
통합(dev push 완료): #437 803807a, #460 74ddd96, #431 82a47db,
#405 be16c1d, #468 후속 테스트 bcaf029.

close: 통합 4건 + 통합 없이 1건(#459, 설계 충돌). #457은 OPEN 유지.
이슈 close 0건 — dev에서 고쳐졌는데 안 닫힌 이슈가 없었다.

무효화: WP4(#466)와 WP6(#467)은 동료가 직접 머지했고, 우리 분석이
지적한 결함을 동료 커밋이 같은 방향으로 해소했다.

보안 보류 5건에 신규 발견 게시: #429 재분류, #355 OAuth 토큰 목적지,
#424 유료 브리지 기본 ON, #408 설치 락 해제, #403 4분할 요청.

A-gate는 사이클마다 3~5라운드를 돌았다. 반복된 원인은 계획서에
테스트나 코드를 적으면서 실물 소스를 확인하지 않은 것이었다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants