Skip to content

feat(ui): config-generator AI provider mode field group (#2208) - #4713

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:feat/config-generator-ai-provider-mode-2208
Jul 10, 2026
Merged

feat(ui): config-generator AI provider mode field group (#2208)#4713
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:feat/config-generator-ai-provider-mode-2208

Conversation

@jimcody1995

@jimcody1995 jimcody1995 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Add the AI-provider-mode field group to the config generator: combine strategy (single / consensus / synthesis), provider/model fields, and an explicit secret-handling notice. No API keys are captured or serialized.

Summary

  • Introduces GeneratorFormState with a gate.aiReview slice mapped to focus-manifest keys (combine, provider, model).
  • Adds AiProviderModeFieldGroup reusing provider/model control patterns from ai-review-settings.tsx.
  • Adds /app/config-generator route + sidebar/command-palette entry for maintainer/owner/operator roles.
  • Uses Callout (variant="safety") to state API keys belong in env/secrets/BYOK — never generated YAML.
  • Vitest coverage: each combine option, provider/model edits, and asserts no secret fields in emitted state/DOM.

Closes #2208
Part of #1683

Scope

Validation

  • npm --workspace @jsonbored/gittensory-ui run typecheck
  • npm --workspace @jsonbored/gittensory-ui test -- --run src/components/site/app-panels/ai-provider-mode-field-group.test.tsx
  • npx eslint on changed UI files
  • Local dev screenshots captured with preview session (?preview=1)

UI Evidence

Page / Feature Before After
/app/config-generator
before: workspace sidebar had no Config generator entry

after: AI provider mode field group with combine/provider/model + secret callout

Notes

Add GeneratorFormState, /app/config-generator route, and AiProviderModeFieldGroup
with combine/provider/model controls, secret-handling Callout, and Vitest coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 10, 2026 16:54
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 10, 2026
@superagent-security

superagent-security Bot commented Jul 10, 2026

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.

1 similar comment
@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 10, 2026
@loopover-orb

loopover-orb Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-10 16:59:10 UTC

8 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · unstable

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This adds a self-contained AI-provider-mode field group (combine strategy radio + provider/model selects) to a new /app/config-generator route, with a GeneratorFormState slice, an immutable patch helper, and a manifest-mapping helper for a future YAML serializer. The diff is narrow, closes the linked #2208, keeps secrets entirely out of captured state (backed by explicit DOM/state assertions in the test file), and reuses existing Callout/RadioGroup primitives consistent with ai-review-settings.tsx patterns. No correctness, security, or schema/migration issues are visible in the diff.

Nits — 5 non-blocking
  • ai-provider-mode-field-group.tsx:38-40 — `combine`/`provider` fall back to `"single"`/`"anthropic"` only in the render layer; if a user submits without touching those controls, `state.gate.aiReview.combine` stays `undefined` and `gateAiReviewManifestPatch` will emit `aiReviewCombine: null` instead of `"single"`, silently losing the visually-selected default once feat(ui): config-generator YAML preview + copy panel #2210's serializer consumes this state — worth confirming that's the intended contract before feat(ui): config-generator YAML preview + copy panel #2210 lands.
  • config-generator-form-state.ts:35-46 — `gateAiReviewManifestPatch` isn't called anywhere outside its own test in this PR; it's fine as forward-prep per the file-level comment, but flag it explicitly as scaffolding for feat(ui): config-generator YAML preview + copy panel #2210 rather than dead code so reviewers don't wonder why it's unused.
  • The external accessibility-brief flags on ai-provider-mode-field-group.tsx:107/119 (`label-control`) don't hold up — both are `<label htmlFor=...>` wrapping the matching `id`'d control, which is a standard accessible pattern, not a regression.
  • ai-provider-mode-field-group.tsx:82 — `RadioGroupItem aria-label={option.title}` duplicates the visible label text already rendered in the sibling `<span>`; not wrong, but redundant since the `<label>` wrapper already associates the text.
  • Consider persisting the default combine/provider on first mount (or have the future serializer treat `undefined` as `"single"`/`"anthropic"`) so the generated YAML matches what's shown selected in the UI.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2208
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: 84 registered-repo PR(s), 31 merged, 1 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 84 PR(s), 1 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jimcody1995
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript
  • Official Gittensor activity: 84 PR(s), 1 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.
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/app/config-generator desktop before /app/config-generator after /app/config-generator
/app/config-generator mobile before /app/config-generator (mobile) after /app/config-generator (mobile)

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.

  • Re-run Gittensory review

@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.

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

@JSONbored
JSONbored merged commit 6a18743 into JSONbored:main Jul 10, 2026
7 of 8 checks passed
@loopover-orb loopover-orb Bot added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 10, 2026
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 11, 2026
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.

Development

Successfully merging this pull request may close these issues.

feat(ui): config-generator AI-provider-mode field group

2 participants