Skip to content

cloud/C11: add Lumina Cloud row to AISettingsModal providers list#243

Merged
blueberrycongee merged 2 commits intomainfrom
loop/cloud-C11-impl
Apr 29, 2026
Merged

cloud/C11: add Lumina Cloud row to AISettingsModal providers list#243
blueberrycongee merged 2 commits intomainfrom
loop/cloud-C11-impl

Conversation

@blueberrycongee
Copy link
Copy Markdown
Owner

What

Adds the visibility-gated "Lumina Cloud" row to the providers Select in src/components/ai/AISettingsModal.tsx. Display-only per the C11 spec — no change to onValueChange, the rehydrate flow, Save / Reset, dirty tracking, or any other modal logic.

Why now

The WIP edit that originally pre-blocked C11 (the Save / Reset refactor for the chat provider section) was committed in 441baf4 ("refactor(ai-settings): explicit Save / Reset for the chat provider section"). The C11 [BLOCKED] marker on cloud/TASKS.md is left over from that gate; the underlying reason ("uncommitted work in progress") no longer applies. Same implicit-unblock pattern as #240 (C3), #241 (C10), #242 (C13).

Changes

// Imports (3 names from luminaCloud + the store hook)
import {
  LUMINA_CLOUD_PROVIDER,
  LUMINA_CLOUD_PROVIDER_ID,
  isLuminaCloudVisible,
} from "@/services/llm/providers/luminaCloud";
import { useLicenseStore } from "@/stores/useLicenseStore";

// Two-line derivation, alongside the existing providerMeta line
const licenseFeatures = useLicenseStore((s) => s.payload?.features);
const licenseFeaturesForCloud = isLuminaCloudVisible(licenseFeatures);

// options is now a spread; the cloud row is appended only when visible
options={[
  ...Object.entries(PROVIDER_MODELS).map(([key, meta]) => ({
    value: key,
    label: meta.label,
  })),
  ...(licenseFeaturesForCloud
    ? [{ value: LUMINA_CLOUD_PROVIDER_ID, label: LUMINA_CLOUD_PROVIDER.label }]
    : []),
]}

That's it. ~14 added lines total in AISettingsModal.tsx. Nothing else in the modal is touched.

Acceptance criteria

  • Lumina Cloud appears in the AI provider list when the license carries cloud_ai.
  • Hidden when no license / no cloud_ai (the isLuminaCloudVisible predicate enforces this — its 6 cases are covered by C7's PR cloud/C7: Lumina Cloud provider definition (re-issued) #235 tests).
  • No changes to rehydrate / dirty-tracking logic.

How I tested

  • npm run typecheck: pass.
  • npm test -- --run src/__tests__/luminaCloud.e2e.test.ts src/services/luminaCloud/ src/components/settings/ src/stores/useLicenseStore.test.ts: 97/97 pass — the cloud surface is unaffected.
  • AISettingsModal.tsx has no existing test file, so no test mocks to update. Visibility logic is already exhaustively tested in C7.

Touched files

  • src/components/ai/AISettingsModal.tsx — 14 added lines (3 imports, 1 store hook + 1 derived bool, 8-line options spread). On the PRD §3 allow-list for "minimal additive edits".
  • cloud/TASKS.md — marked C11 [x] and appended Done-log entry.

Notes for Lead

  • Selecting the new option triggers the existing onValueChange, which falls through harmlessly: PROVIDER_MODELS['lumina-cloud']?.defaultBaseUrl is undefined, the Model dropdown is empty, the user can't actually configure anything from this modal yet. The Account tab (C10) is the canonical entry point for cloud AI today; this row is essentially a discovery affordance for users who already see the "AI" tab and would otherwise miss the cloud option.
  • Wiring the actual chat path through the Lumina Cloud provider (model fetch via fetchLuminaCloudModels, OpenAI-compatible plumbing, etc.) is a P2 follow-up — not in scope for C11's "display only" guidance.
  • This is the last P1 task. With this merged, every C1–C13 line in cloud/TASKS.md is [x].

blueberrycongee and others added 2 commits April 28, 2026 16:09
Display-only addition per the C11 spec. The WIP that originally
gated this task (Save / Reset for the chat provider section) was
landed in 441baf4 — working tree is now clean, signalling
implicit unblock from Lead.

Three additive imports plus a two-line derivation:
  import { LUMINA_CLOUD_PROVIDER, LUMINA_CLOUD_PROVIDER_ID,
           isLuminaCloudVisible } from "@/services/llm/providers/luminaCloud";
  import { useLicenseStore } from "@/stores/useLicenseStore";
  ...
  const licenseFeatures = useLicenseStore((s) => s.payload?.features);
  const licenseFeaturesForCloud = isLuminaCloudVisible(licenseFeatures);

The provider Select's `options` array is rebuilt as a spread:
existing PROVIDER_MODELS entries plus, when the license has the
`cloud_ai` feature, a single `{ value: 'lumina-cloud', label:
'Lumina Cloud' }` row. No change to onValueChange, the rehydrate
flow, dirty tracking, Save / Reset, or any other AISettingsModal
logic — the spec's "display only" cap is honored to the letter.

Selecting the option triggers the existing onValueChange path,
which falls through harmlessly because PROVIDER_MODELS doesn't
have a 'lumina-cloud' entry: defaultBaseUrl is undefined, the
model dropdown is empty. Wiring the actual chat path through this
provider belongs to a future task (the Account tab is the canonical
entry point for cloud AI today).

C11's only acceptance bullet is "Add Lumina Cloud to the providers
list display only" — done. No new tests; the visibility predicate
itself is covered by C7's 8 tests, and AISettingsModal has no
existing test file (hence no test-mock to update).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f60461ef5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +317 to +321
...(licenseFeaturesForCloud
? [{
value: LUMINA_CLOUD_PROVIDER_ID,
label: LUMINA_CLOUD_PROVIDER.label,
}]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Disable unsupported Lumina Cloud provider selection

When cloud_ai is present, this adds a normal selectable option with value: "lumina-cloud", but the rest of the provider pipeline still treats only the existing LLMProviderType set as configurable. If a user picks this row and saves, config.provider becomes an unmapped provider ID (no PROVIDER_MODELS entry and no opencode provider mapping), which leads to an empty/invalid model path and backend provider sync errors being swallowed in useAIStore.setConfig; the UI can report success while chat requests run without the intended provider/model. Since C11 is display-only, this row should be rendered non-selectable (or otherwise prevented from mutating config) until provider wiring exists.

Useful? React with 👍 / 👎.

@blueberrycongee blueberrycongee merged commit 85db46a into main Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant