Skip to content

feat(ui): add the scoped-permissions confirmation step to the install flow#7401

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
shin-core:feat/install-scoped-permissions-4802
Jul 20, 2026
Merged

feat(ui): add the scoped-permissions confirmation step to the install flow#7401
JSONbored merged 2 commits into
JSONbored:mainfrom
shin-core:feat/install-scoped-permissions-4802

Conversation

@shin-core

Copy link
Copy Markdown
Contributor

What

Adds the scoped-permissions confirmation step to the self-serve install flow — a new /install/permissions route that is the third step (“Confirm scoped permissions”) of the signup → install → confirm flow described in #4802. Before a customer finishes the GitHub install, this page shows exactly which repository permissions the LoopOver App requests, and why, so the grant on GitHub holds no surprises.

This is a scoped slice of #4802, continuing the /install entry surface (#7203) whose third step previously pointed only to a follow-up. That step now links here.

Details

  • /install/permissions (install.permissions.tsx) lists the real permission set, grouped:
    • Baseline access (always requested): Metadata (read), Pull requests (read), Issues (write).
    • Opt-in write scopes (only when the matching setting is on): Checks (write), Pull requests (write), Contents (write), each with the setting that enables it.
    • Events it listens for: issues, issue_comment, pull_request, repository.
    • A “You stay in control” safety callout linking to privacy & security.
  • The permission set mirrors the canonical REQUIRED_INSTALLATION_PERMISSIONS / OPTIONAL_CHECK_RUN_PERMISSION / OPTIONAL_PR_WRITE_PERMISSION / OPTIONAL_CONTENTS_WRITE_PERMISSION / REQUIRED_INSTALLATION_EVENTS constants in src/github/backfill.ts (the same source install-health checks against), so it stays accurate rather than fabricated.
  • /install is split into a thin layout (install.tsx, renders an <Outlet />) plus its index page (install.index.tsx, the existing three-step surface, unchanged in content) so /install and /install/permissions render as sibling pages under the shared path — the same layout/index pattern app.tsx/app.index.tsx and docs.tsx already use. The regenerated routeTree.gen.ts reflects only these two new routes.
  • The /install step-3 card now links to the new page (“Review the exact scopes →”).

Built on the shared design-system primitives (Section, Card, Callout, Eyebrow, design tokens) per the issue’s design-system boundary. Read-only informational surface: reads no secrets, changes no auth backend; the real grant still happens on GitHub.

Validation

  • npm run ui:typecheck, npm run ui:lint — pass.
  • Existing install.test.tsx updated for the moved InstallPage import and passing; full UI test suite green.
  • git diff --check clean; the diff is exactly the five install-flow files (no doc/openapi churn).

UI Evidence

/install/permissions is a new route, so before is the app’s Not-Found state at that path and after is the new page. loopover-ui is a dark-mode-only build (theme-toggle.tsx — the toggle was removed and there is no light theme to force), so Dark is the only theme dimension; each viewport is shown below.

Viewport Before (Not Found) After (/install/permissions)
Desktop · Dark (1280×800) Desktop · Dark · before Desktop · Dark · after
Tablet · Dark (768×1024) Tablet · Dark · before Tablet · Dark · after
Mobile · Dark (375×812) Mobile · Dark · before Mobile · Dark · after

Closes #4802

@shin-core
shin-core requested a review from JSONbored as a code owner July 20, 2026 05:54
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 20, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 20, 2026
@loopover-orb

loopover-orb Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-20 06:46:05 UTC

6 files · 1 AI reviewer · no blockers · CI green · unstable

⏸️ Suggested Action - Manual Review

Review summary
This is a clean, well-scoped UI addition: it splits `/install` into a layout + index (mirroring the existing `app.tsx`/`app.index.tsx` pattern) and adds a new `/install/permissions` route whose content mirrors the canonical permission/event constants in `src/github/backfill.ts`. The routeTree.gen.ts diff is consistent with adding two child routes under `/install`, and the moved `InstallPage` export is correctly re-imported in install.test.tsx. The only real gap is that the new install.permissions.tsx page (97 lines, multiple data tables) ships with no test file, while the pre-existing install.test.tsx was only patched for the import path change.

Nits — 5 non-blocking
  • apps/loopover-ui/src/routes/install.permissions.tsx has no dedicated test file (only install.index.tsx's existing test was updated), so the new page's rendering of REQUIRED_SCOPES/OPTIONAL_SCOPES/EVENTS is unverified by tests — the AI-branded 'LoopOver Orb Review Agent' wording in the Checks scope summary (line ~92) is also a specific claim worth double-checking against current product naming.
  • apps/loopover-ui/src/routeTree.gen.ts uses `as any` casts (pre-existing pattern for generated route files, not introduced logic, but worth confirming this file is truly fully regenerated rather than hand-edited).
  • apps/loopover-ui/src/routes/install.index.tsx:56 and install.permissions.tsx:122 — both page components are large single-function components (~84–97 lines); consider extracting the STEPS/REQUIRED_SCOPES/OPTIONAL_SCOPES render blocks into small subcomponents for readability, though this matches the existing site-page style so it's optional.
  • The permission summaries (e.g., Issues:Write enabling PR comments/labels) are asserted to mirror `src/github/backfill.ts` constants but that file isn't shown in this diff — worth a maintainer double-check that the six scopes/four events listed are exhaustive and currently accurate.
  • Add a minimal render test for InstallPermissionsPage (e.g., asserting the three baseline scopes, three optional scopes, and four event badges render) alongside the updated install.index.test.tsx, given this page is pure content with no dynamic data — cheap to cover and guards against future drift from backfill.ts.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #4802
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 75 registered-repo PR(s), 48 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor shin-core; Gittensor profile; 75 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: shin-core
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Solidity, Dart, Python, CSS, PHP, Rust
  • Official Gittensor activity: 75 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/install desktop before /install
before /install
after /install
after /install
/install mobile before /install (mobile)
before /install (mobile)
after /install (mobile)
after /install (mobile)
/install/permissions/test desktop before /install/permissions/test
before /install/permissions/test
after /install/permissions/test
after /install/permissions/test
/install/permissions/test mobile before /install/permissions/test (mobile)
before /install/permissions/test (mobile)
after /install/permissions/test (mobile)
after /install/permissions/test (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/install before /install (scroll)
before /install (scroll)
after /install (scroll)
after /install (scroll)
/install/permissions/test before /install/permissions/test (scroll)
before /install/permissions/test (scroll)
after /install/permissions/test (scroll)
after /install/permissions/test (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

loopover-orb[bot]
loopover-orb Bot previously approved these changes Jul 20, 2026

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@JSONbored
JSONbored merged commit 09b028c into JSONbored:main Jul 20, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self-serve signup & App-install flow

2 participants