feat(ui): add maintainer activation preview card - #3790
Merged
Conversation
The backend for one-step maintainer activation (buildMaintainerActivationPreview, GET/POST /v1/repos/:owner/:repo/activation(-preview)) shipped with no UI surface. Add an ActivationPreview card to the maintainer console that loads the live repo-specific preview on mount (real loading/error/empty states, no mock data) and offers a single "Enable advisory mode" action that posts the activation route and reflects the result inline.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 2c7dec1 | Commit Preview URL Branch Preview URL |
Jul 06 2026, 10:08 AM |
30 tasks
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
buildMaintainerActivationPreviewinsrc/services/maintainer-activation.ts,GET /v1/repos/:owner/:repo/activation-preview,POST .../activation) shipped in PR feat(activation): one-step maintainer activation preview + advisory ramp (#701) #708, but there was no UI page or component that called it — only a docs page describing the API in prose.ActivationPreview(apps/gittensory-ui/src/components/site/app-panels/activation-preview.tsx), a new card mounted in the existing maintainer console (MaintainerPanel→apps/gittensory-ui/src/components/site/app-panels/maintainer-panel.tsx). On mount it callsGET /v1/repos/:owner/:repo/activation-previewfor the selected repo and renders the real returned preview (PRs evaluated, how many would have been flagged, finding-type breakdown, per-PR sample table). A single "Enable advisory mode" button postsPOST .../activationand reflects success/failure inline, then reloads the preview so the button state (advisory already enabled vs. not) reflects the live result.apps/gittensory-ui/src/components/site/app-panels/maintainer-panel.tsx):AiReviewSettingsandMaintainerSettings(both repo-picker +apiFetchload/save + inlinerole="status"message cards), plusOwnerPanel(apps/gittensory-ui/src/components/site/app-panels/owner-panel.tsx) for theuseApiResource-style GET-on-mount +StateBoundaryloading/error/empty pattern. The repo picker reuses the existingextractPreviewRepoOptions/splitRepoFullNamehelpers fromapps/gittensory-ui/src/lib/maintainer-settings-preview.tsrather than inventing a new one.MaintainerPanel(next toSurfacePreview/MaintainerSettings), rather than a new top-level route — this matches how every other per-repo maintainer surface in this codebase (AI review, repo settings, focus manifest) is already composed as a card within the same console, and keeps the PR to a UI-only diff with no routing changes.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlint(no workflow files touched by this PR; not run)npm run typecheck(backend typecheck — nosrc/**changes in this PR, ran clean as a sanity check)npm run test:coverage(nosrc/**changes — this is a UI-only PR, socodecov/patchhas no obligation here; not run since it is backend-only coverage)npm run test:workers(no Cloudflare Worker changes; not run)npm run build:mcp(no MCP changes; not run)npm run test:mcp-pack(no MCP changes; not run)npm run ui:openapi:check(confirmed no drift — no API/schema changes in this PR)npm run ui:lint— 0 errors, 87 pre-existing warnings unrelated to this diff (verified none are in the changed files)npm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderate(no dependency changes; not run)activation-preview.test.tsxcovers loaded/error/empty states, the activate success + reload round-trip, the activate-failure inline error path (preview data untouched), the no-registered-repos fallback, and the invalidowner/repoinput branch.npm --workspace @jsonbored/gittensory-ui run test→ 71/71 passing (9 files, including the new one).If any required check was skipped, explain why:
apps/gittensory-ui/**(nosrc/**). Codecov'scodecov/patchgate only coverssrc/**, so this diff owes no backend coverage; UI correctness is covered by the new component test file instead. Skipped checks above are backend/MCP/dependency-only gates that have nothing to validate for a UI-only change.Safety
MaintainerPanelrole gate is unchanged and continues to gate this new card the same as every other maintainer-only card in the file.)activation-preview/activationendpoints via the existingapiFetchhelper; loading/error/empty states are driven entirely by the live response, with no mock or demo data path.UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. Not satisfied — see UI Evidence section below for why.docs.self-hosting-configuration.tsxalready documents the underlying API in prose and needs no update for this UI-only consumption of it.)UI Evidence
I could not capture real screenshots in this environment. The new card only renders past the existing
MaintainerPanelrole gate (a real authenticated session with amaintainer/owner/operatorrole) and needs live backend data (a registered repo with cached pull requests) to show its loaded state — this sandboxed worktree has no deployed backend, no OAuth session, and no seeded repo/PR data to drive it, and fabricating a screenshot or mock data would violate this repo's no-mock-fallback-data rule. Rather than fabricate a placeholder, I'm flagging this honestly per the task instructions. The component's four real states (loading, error, empty, loaded-with-data) are instead exercised and asserted against inactivation-preview.test.tsxvia React Testing Library, which is the closest verifiable substitute available here.Notes
apps/gittensory-ui/src/components/site/app-panels/activation-preview.tsx(new),apps/gittensory-ui/src/components/site/app-panels/activation-preview.test.tsx(new),apps/gittensory-ui/src/components/site/app-panels/maintainer-panel.tsx(mounts the new card).src/**, migration, OpenAPI, or Cloudflare-binding changes — nothing to regenerate.