feat(ui): add first-session onboarding preview card to maintainer dashboard - #4718
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…hboard Closes JSONbored#2217 Adds OnboardingPreviewCard, which auto-runs the existing settings-preview simulator (buildSettingsPreviewRequest) against a repo's most recently cached pull request on first visit, so a maintainer sees "here's what Gittensory would have flagged" without filling out SurfacePreview's form. Reuses PreviewResult (now exported) for the decision/checklist/comment rendering rather than duplicating it. Dismissible via the same localStorage first-visit idiom app.index.tsx's OnboardingChecklist uses. Distinct from ActivationPreview (JSONbored#701/JSONbored#708): that shows aggregate multi-PR evaluation stats from a dedicated endpoint; this shows one demo run's full policy decision from the settings-preview pipeline.
2abc7ab to
5c8246a
Compare
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-10 19:34:11 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Required field added by the merged check-run-readiness-table PR (JSONbored#2216); keeps the SettingsPreviewResponse test fixture in sync post-rebase.
Summary
OnboardingPreviewCardto the maintainer dashboard: on first visit, it auto-runs the existing settings-preview simulator (buildSettingsPreviewRequest,POST /v1/repos/:owner/:repo/settings-preview) against the repo's most recently cached pull request, so a maintainer sees "here's what Gittensory would have flagged" without manually filling outSurfacePreview's form.title, and its linked-issue number scraped from thereviewabilityrow'sreasonstring, e.g."linked issue #7"); everything the cachedreviewabilityprojection doesn't carry (author identity, labels, body) is filled from the sameconfirmed-minerrepresentative scenarioSurfacePreviewalready defaults to.PreviewResult(now exported frommaintainer-panel.tsx) — the exact same decision/checklist/comment-preview UISurfacePreviewalready uses — rather than inventing a new findings display. The settings-preview response has no discrete findings array; "flagged" here meansdecision.willComment/willLabel/willCheckRun.localStorage, reusing this codebase's established first-visit-card idiom (useLocalStorage, the same patternapp.index.tsx'sOnboardingChecklistandnotification-readiness-card.tsxalready use) rather than inventing a new mechanism.ActivationPreview(one-step maintainer activation / instant-value onboarding #701/feat(activation): one-step maintainer activation preview + advisory ramp (#701) #708, already merged in feat(ui): add maintainer activation preview card #3790): that card shows aggregate multi-PR evaluation stats from a dedicated/activation-previewendpoint with an activation CTA. This card shows one demo run's full policy decision (comment/label/check-run + trust checklist + sanitized comment text) from the settings-preview pipeline — complementary, not a re-implementation.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally (apps/**is Codecov-ignored — UI-only change — but shipped 5 new tests: flagged-findings-present, clean/skip verdict, no-recent-PRs empty state, API-error state, and dismiss-persists-and-skips-the-fetch-on-remount)npm run test:workersnpm run build:mcpnpm run ui:openapi:checknpm run ui:openapi:settings-paritynpm run ui:version-auditnpm run docs:drift-checknpm run manifest:drift-checknpm run command-reference:checknpm run db:migrations:checknpm run db:schema-drift:checknpm run ui:lintnpm run ui:typechecknpm run ui:test(138/138 passed across both UI workspaces)npm run ui:buildnpm audit --audit-level=moderate(0 vulnerabilities)If any required check was skipped, explain why:
npm run test:mcp-packandnpm run cf-typegen:checkfail locally only due to a pre-existing Windows dev-machinespawnSyncbare-command resolution gap (ENOENTfornpm/wranglerwithoutshell: true), unrelated to this diff — nopackages/gittensory-mcporwrangler.jsoncchanges here.npm run engine-parity:drift-checkfails locally only because it falls back to my local (stale) forkorigin/mainref absentGITHUB_BASE_SHA, which real CI sets. Nosrc/signals/**/packages/gittensory-engine/**files are touched.Safety
settings-previewendpoint/sanitizerSurfacePreviewalready calls; no new data surface.previewCommentthe existing simulator already produces and labels "sanitized".)MaintainerPanelalready enforces.)settings-previewroute.)POSTagainst real cached PR data, with a tested loading/error/emptyStateBoundary, not a static demo.UI Evidencesection below with JPG/JPEG or PNG screenshots.UI Evidence
demo run against a real cached PR — would comment, label, and check-run
no recent pull requests cached yet
Notes
MaintainerDashboardView(right after the refresh-meta row, before the metrics grid) so it reads as the first-session "hero" moment the issue describes, ahead ofActivationPreview/SurfacePreview.