docs(36): update review fix report and mark all 4 findings fixed

This commit is contained in:
Jakub Zych
2026-11-25 01:30:05 +01:00
parent bfb0bee809
commit 52dd62581e
2 changed files with 50 additions and 38 deletions

View File

@@ -10,20 +10,23 @@ findings:
title: "Missing request sequence guard in `ApiTokenCreateDialog.vue` `loadScopes()`" title: "Missing request sequence guard in `ApiTokenCreateDialog.vue` `loadScopes()`"
- id: IN-01 - id: IN-01
severity: info severity: info
disposition: open disposition: fixed
source: 36-REVIEW-FIX.md (51b60b94)
title: "`warnUncoveredBackendWriteTools` recompiles the plugin token scope catalog once per backend write tool when `cabana` is not activated on `app`" title: "`warnUncoveredBackendWriteTools` recompiles the plugin token scope catalog once per backend write tool when `cabana` is not activated on `app`"
- id: IN-02 - id: IN-02
severity: info severity: info
disposition: open disposition: fixed
source: 36-REVIEW-FIX.md (bfb0bee8)
title: "Accordion header toggle buttons appear interactive during search even though clicking is a no-op" title: "Accordion header toggle buttons appear interactive during search even though clicking is a no-op"
- id: IN-03 - id: IN-03
severity: info severity: info
disposition: open disposition: fixed
source: 36-REVIEW-FIX.md (bfb0bee8)
title: "Static DOM `panelId` and mount-only `expanded` initialization in `ScopePicker.vue`" title: "Static DOM `panelId` and mount-only `expanded` initialization in `ScopePicker.vue`"
fixed: 1 fixed: 4
open: 3 open: 0
total: 4 total: 4
recorded: "2026-11-24" recorded: "2026-11-25"
--- ---
# Phase 36: Code Review Disposition # Phase 36: Code Review Disposition
@@ -31,8 +34,8 @@ recorded: "2026-11-24"
| Finding | Severity | Disposition | Source | | Finding | Severity | Disposition | Source |
|---------|----------|-------------|--------| |---------|----------|-------------|--------|
| WR-01 | warning | fixed | `36-REVIEW-FIX.md` (`2f2c33e6`) | | WR-01 | warning | fixed | `36-REVIEW-FIX.md` (`2f2c33e6`) |
| IN-01 | info | open | - | | IN-01 | info | fixed | `36-REVIEW-FIX.md` (`51b60b94`) |
| IN-02 | info | open | - | | IN-02 | info | fixed | `36-REVIEW-FIX.md` (`bfb0bee8`) |
| IN-03 | info | open | - | | IN-03 | info | fixed | `36-REVIEW-FIX.md` (`bfb0bee8`) |
Dispositions: `open` (recorded, not yet triaged), `fixed`, `skipped`, `deferred`. Dispositions: `open` (recorded, not yet triaged), `fixed`, `skipped`, `deferred`.

View File

@@ -1,22 +1,21 @@
--- ---
phase: 36-granular-mcp-oauth-api-token-scope-picker phase: 36-granular-mcp-oauth-api-token-scope-picker
status: fixed status: fixed
fix_scope: critical_warning fix_scope: all
iteration: 1 iteration: 2
review_source: 36-REVIEW.md review_source: 36-REVIEW.md
fixed: 1 fixed: 4
skipped: 0 skipped: 0
out_of_scope: 3 out_of_scope: 0
fixed_at: "2026-11-24" fixed_at: "2026-11-25"
--- ---
# Phase 36: Code Review Fix Report # Phase 36: Code Review Fix Report
**Phase:** `36-granular-mcp-oauth-api-token-scope-picker` **Phase:** `36-granular-mcp-oauth-api-token-scope-picker`
**Source Review:** `36-REVIEW.md` **Source Review:** `36-REVIEW.md`
**Fix Scope:** `critical_warning` (`--fix` without `--all`: Critical + Warning findings only) **Fix Scope:** `all` (Warning + Info findings resolved across iterations 1–2)
**Iteration:** 1 **Status:** `fixed` (`4/4` findings resolved; `0` open)
**Status:** `fixed` (`1/1` in-scope findings resolved; `3` info findings left out-of-scope)
## Fixed Findings ## Fixed Findings
@@ -24,26 +23,36 @@ fixed_at: "2026-11-24"
- **Severity:** Warning - **Severity:** Warning
- **Commit:** `2f2c33e6` (`fix(36): guard stale scope catalog responses in ApiTokenCreateDialog`) - **Commit:** `2f2c33e6` (`fix(36): guard stale scope catalog responses in ApiTokenCreateDialog`)
- **Files Modified:** - **Files Modified:** `admin/src/components/account/ApiTokenCreateDialog.vue`, `admin/tests/account/ApiTokenCreateDialog.test.ts`, `modules/boardwalk/dist/*`
- `admin/src/components/account/ApiTokenCreateDialog.vue` - **What Changed:** Added a monotonically incremented `loadSeq` guard and `props.open` check in `loadScopes()` (plus invalidation on close and unmount), preventing stale scope responses from prematurely clearing `scopesLoading` or resetting an active Custom selection. Added two Vitest regression tests.
- `admin/tests/account/ApiTokenCreateDialog.test.ts`
- `modules/boardwalk/dist/index.html` & rebuilt assets ### IN-01: `warnUncoveredBackendWriteTools` recompiles the plugin token scope catalog once per backend write tool when `cabana` is not activated on `app`
- **What Changed:**
- Added a monotonically incremented `loadSeq` guard in `ApiTokenCreateDialog.vue`, mirroring `ConnectView.vue`. - **Severity:** Info
- `loadScopes()` captures `const seq = ++loadSeq`, ignores stale settlements when `seq !== loadSeq || !props.open`, and only clears `scopesLoading.value = false` in `finally` when `seq === loadSeq`. - **Commit:** `51b60b94` (`fix(36): compile token scope catalog once in pier boot coverage warning`)
- The `watch(() => props.open)` close branch increments `loadSeq += 1` and resets `scopesLoading`, `scopesFailed`, and `scopes`, and `onBeforeUnmount` increments `loadSeq += 1` to invalidate any in-flight load. - **Files Modified:** `modules/cabana/token_scopes_export.go`, `modules/cabana/README.md`, `modules/pier/uncovered_scopes_warning.go`, `modules/pier/uncovered_scopes_warning_test.go`
- Added two regression tests in `admin/tests/account/ApiTokenCreateDialog.test.ts` covering both late-settling stale responses (verifying open `ScopePicker` and Custom draft are preserved) and early-settling stale failures (verifying the loading skeleton remains visible until the active request settles). - **What Changed:** Exported `cabana.TokenScopeMatcher` / `cabana.NewTokenScopeMatcher` (documented in `modules/cabana/README.md`) so `warnUncoveredBackendWriteTools` resolves or compiles the scope catalog once per boot check instead of once per tool, and logs one clear catalog-compile warning instead of misleading per-plugin uncovered-tool warnings when catalog compilation fails. Added a unit test in `modules/pier/uncovered_scopes_warning_test.go`.
- Rebuilt embedded SPA assets in `modules/boardwalk/dist`.
- **Verification:** ### IN-02: Accordion header toggle buttons appear interactive during search even though clicking is a no-op
- **Severity:** Info
- **Commit:** `bfb0bee8` (`fix(36): polish ScopePicker search collapse, unique panel IDs, and lazy catalog expand`)
- **Files Modified:** `admin/src/components/scopes/ScopePicker.vue`, `admin/tests/scopes/ScopePicker.test.ts`, `modules/boardwalk/dist/*`
- **What Changed:** Added a temporary `searchCollapsed` set (cleared on every `query` change) so clicking a matching group header during search collapses/expands it cleanly without mutating the saved pre-search `expanded` set, which still restores verbatim when search is cleared. Added a Vitest regression test.
### IN-03: Static DOM `panelId` and mount-only `expanded` initialization in `ScopePicker.vue`
- **Severity:** Info
- **Commit:** `bfb0bee8` (`fix(36): polish ScopePicker search collapse, unique panel IDs, and lazy catalog expand`)
- **Files Modified:** `admin/src/components/scopes/ScopePicker.vue`, `admin/tests/scopes/ScopePicker.test.ts`, `modules/boardwalk/dist/*`
- **What Changed:** Replaced static `scope-group-panel-${index}` IDs with Vue `useId()`-prefixed IDs (`${pickerId}-group-${index}`) and replaced mount-only expansion setup with an immediate watcher on `allGroups.value.length` so smart expansion also initializes if a catalog populates lazily. Added Vitest regression tests for both.
## Verification
- `go vet ./...` — **PASS**
- `go test -short ./modules/cabana ./modules/pier ./modules/boardwalk -count=1` — **PASS**
- `scripts/check-admin-openapi.sh --check` — **PASS**
- `go test ./cmd/summer -run 'TestCommandsDocumented|TestDocsTree' -count=1 && go run ./cmd/summer docs:build --check` — **PASS**
- `npm --prefix admin run typecheck` — **PASS** - `npm --prefix admin run typecheck` — **PASS**
- `npm --prefix admin run test -- tests/account/ApiTokenCreateDialog.test.ts` — **PASS** (`26/26` tests) - `npm --prefix admin run test` — **PASS** (`120/120` test files, `1769/1769` tests)
- `npm --prefix admin run build && scripts/check-admin-dist.sh` — **PASS** (`modules/boardwalk/dist matches a fresh build`) - `npm --prefix admin run build && scripts/check-admin-dist.sh` — **PASS** (`modules/boardwalk/dist matches a fresh build`)
- `go test -short ./modules/boardwalk/...` — **PASS**
## Out of Scope (`info` — pass `--all` to include)
| Finding | Severity | Summary |
|---------|----------|---------|
| IN-01 | info | Fallback scope catalog recompilation in `warnUncoveredBackendWriteTools` when `cabana` is not activated on `app` |
| IN-02 | info | Accordion toggle buttons during search are no-ops without `disabled` / `aria-disabled` |
| IN-03 | info | Static `scope-group-panel-${index}` DOM IDs and mount-only `expanded` initialization in `ScopePicker.vue` |