fix(studio): wire Settings → Deployments page into router and nav - #299
Merged
Conversation
`settings/deployments-page.tsx` shipped complete — targets list, deploy trigger, status polling, build logs, against the already-mounted `/api/v1/deployments` — but nothing linked to it: no route in `router.tsx` and no sidebar entry, so the whole feature was dead code on the client. - Register `/settings/deployments` and the `/$adminPath/settings/deployments` variant, following the surrounding `createRoute` + `withSuspense(lazy(...))` pattern used by the other Integrations pages. - Add "Deployments" to the Integrations group of the settings sidebar. - Add tripwires that lock the class, not just this page: a source scan requiring every `*-page.tsx` under `modules/settings/` to be referenced by `router.tsx` and every nav `to:` to have a matching route, plus a route-tree test driving the real `routeTree` over a memory history. - DoD: setup-impact registry #84 (n/a), CHANGELOG, docs route path, and out-of-scope finding B9 (admin-path tree still misses change-feed and encryption — same class, left out of scope).
…i-be374d # Conflicts: # .kiro/specs/admin-setup-wizard/setup-impact.md
khuepm
added a commit
that referenced
this pull request
Jul 27, 2026
…l-8d9631 Resolved three append-only conflicts, all from main landing the Studio Deployments wiring PR (#299) in parallel: - out-of-scope-backlog.md: main took B9 for the admin-path route gap, so the CF queue-consumer finding is renumbered B10. - setup-impact.md: main took Registry rows 84 and 85, so this row moves to 86 (DoD requires a number above the current max, not "the next one"). - CHANGELOG.md: both Unreleased entries kept side by side. Both PRs touch deployments and both added a tripwire, but they are disjoint: main wired the Studio page to a route, this branch wires the KeyProvider into the harness.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/studio/src/modules/settings/deployments-page.tsxđã hoàn chỉnh từ lâu — list targets, "Deploy now", poll status, xem build log, gọi backend/api/v1/deploymentsđã mount sẵn — nhưng không ai link tới nó:router.tsxkhông có route, sidebar Settings không có nav entry.git grep "DeploymentsPage\|deployments-page" -- apps/studio/srcchỉ khớp đúng dòng khai báo của chính nó. Tức là dead code phía client kể từ khi ship.PR này chỉ nối dây (không đụng backend/schema/SDK):
/settings/deployments+ biến thể$adminPath(/$adminPath/settings/deployments), theo đúng patterncreateRoute({...})+withSuspense(lazy(...))của các trang Integrations kề bên (webhooks, git, email, notifications, extensions, marketplace đều có cả hai cây).{ id: 'deployments', label: 'Deployments', to: '/settings/deployments' }vào nhómintegrationscủasettings/layout.tsx.*-page.tsxtrongmodules/settings/phải đượcrouter.tsxtham chiếu và MỌI navto:phải có route khớp; cộng test chạy cây route thật trên memory history.Loại thay đổi
fix— Sửa bugtest— Thêm / sửa testdocs— Cập nhật tài liệuPhase / Feature liên quan
Mở rộng
#28 deployment-integrations(Setup Impact Registry) — phần Studio wiring còn thiếu. Xemdocs/en/features/deployment-integrations.md§8.✅ Definition of Done (DoD)
Code Quality
pnpm typecheck16/16 passArchitecture & Docs
architecture.md— n/a, không đổi cấu trúc hệ thốngapps/cms/openapi.yaml— n/a, không có endpoint mới (/api/v1/deploymentsđã tồn tại và đã có trong spec)packages/sdk— n/a,client.deployments.*đã có sẵn trongrest/legacy.ts+ typesdocs/en/features/deployment-integrations.md§8 ghi rõ đường dẫn route + vị trí trong sidebarTesting
settings/__tests__/deployments-page.test.tsx— render trang với API mock (targets + deployments + status badge)settings/__tests__/deployments-route.test.tsx— dựngrouteTreethật từrouter.tsxtrêncreateMemoryHistory, khẳng định/settings/deploymentsresolve ra trang trongSettingsLayout, link sidebarhref="/settings/deployments"+aria-current="page", và/my-admin/settings/deploymentscũng resolveNegative control: stash 2 file wiring → 6/8 test đỏ; restore → xanh. Test không phải loại "luôn pass".
Runtime Compatibility
Security
/api/v1/deploymentsgiữ nguyên guard + scopesiteIdsẵn cóDatabase / Migrations
Conventional Commits
fix(studio): wire Settings → Deployments page into router and navSetup impact (DoD §2)
.kiro/specs/admin-setup-wizard/setup-impact.md, trạng tháin/a— KHÔNG seed / settings key / policy DB / bước wizard / capability / backfill.pnpm registry:check→ 85 dòng, số không trùng.Desktop/mobile shell impact (DoD §2d)
getApiBaseUrl()(C2),build.outDir/base(C3), port dev 2026 (C4), API webview mới (C5), luồng auth/CORS (C6),/health(C7). Không thêm endpoint SPA gọi — route mới chỉ là client-side route nên shell Tauri nhận tự động.Out-of-scope findings (DoD §7)
.kiro/steering/out-of-scope-backlog.md: cây admin-path còn thiếuchange-feedvàencryption— sidebar hiện hai link đó ở mọi instance, nhưng trên instance dùng custom admin path chúng không resolve. Cùng class "quên nối dây" với PR này, đểopenvì ngoài scope. Tripwire hiện cố ý chỉ kiểm cây/settingsđể không đỏ CI vì hai route sẵn thiếu; khi vá B9 thì mở rộng tripwire kiểm cả hai cây.Screenshots / Recordings
Chưa có — xem "Notes for Reviewers".
Rollback Plan
Revert commit. Không có migration, không có state ngoài; revert đưa trang về đúng trạng thái cũ (không reachable), không ảnh hưởng deployment target đã tạo (dữ liệu nằm ở backend, vẫn dùng được qua API/SDK).
Notes for Reviewers
/health200), nhưng không có instance dùng được:lumibase/lumibase_setup_testchưa migrate, cònlumibase_base/lumibase_ciở schema trước ADR-010 (thiếu cộtrealm) và/api/v1/setup/statetrảuninitialized. Vào được/settings/deploymentsphải chạy setup wizard tạo tài khoản admin rồi đăng nhập. Bù lại, testdeployments-route.test.tsxchạy cây route thật nên vẫn chứng minh được URL → trang và nav link → đúng URL. Ai có instance sẵn thì xác nhận giúp bằng ảnh chụp là đủ.lib/keybindings/commands.ts) cố ý không đụng — danh sách đó vốn chỉ chọn một phần (change-feed, materialize, domains, uploads, notifications, git… cũng không có), thêm mỗi Deployments sẽ lệch quy ước hiện tại.ERR_REQUIRE_ESMtừhtml-encoding-snifferqua jsdom 29) — lỗi này có sẵn trênmain. Mình chạy test + pre-commit hook bằng Node 22.22.2.