fix(ui): the config upload never rendered in the packaged app - #3053
fix(ui): the config upload never rendered in the packaged app#3053oscharko wants to merge 2 commits into
Conversation
GatewayConfigUpload was loaded through next/dynamic inside a dialog that is already behind a dynamic boundary. In the static export the nested boundary never resolved: its loading fallback renders null while it waits, so the control simply never appeared and nothing was logged anywhere. Driving the packaged 0.3.0 build as an operator is what surfaced it — every unit test renders the component directly and passes. Imported directly now. Deferring a component that already sits inside a lazily-loaded dialog buys no initial-page bytes, which was the only reason for the indirection. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesGateway upload loading
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ❌ 2❌ Failed checks (2 warnings)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx`:
- Around line 39-42: Remove the obsolete dynamic-loading comment immediately
after the direct GatewayConfigUpload import. Delete the lines describing a
separate upload chunk, chunk-load failure, and retry fallback, leaving the
current GatewaySetupDialog implementation unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 8ab5672e-444b-4f8f-8c4e-f98bca785c65
📒 Files selected for processing (1)
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (14)
- GitHub Check: Cross-platform smoke (ubuntu-latest)
- GitHub Check: Cross-platform smoke (windows-latest)
- GitHub Check: Cross-platform smoke (macos-latest)
- GitHub Check: Build, scan, SBOM, smoke
- GitHub Check: ui
- GitHub Check: Coverage shard (packages 2/3)
- GitHub Check: Coverage shard (packages 1/3)
- GitHub Check: Coverage suite (keiko-ui)
- GitHub Check: Coverage shard (packages 3/3)
- GitHub Check: Coverage suite (scripts)
- GitHub Check: Core quality
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (csharp)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use strict TypeScript settings, forbidany, require explicit function return types, and model states with discriminated unions rather than casts.
Keep cyclomatic complexity at or below 10, keep functions within 50 non-comment lines, and extract helpers when necessary.
Use the intended logger or diagnostic sink instead ofconsole.*in product code.
Validate hostile inputs before processing, fail closed at trust boundaries, and never route generated or model-produced code around the sandbox egress boundary.
Do not swallow errors with empty catches; surface sufficient diagnostic context, including a correlation ID for server-visible opaque 500 errors.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
packages/keiko-ui/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/keiko-ui/**/*.{ts,tsx}: Thekeiko-uiworkspace must enforce the root values for complexity, maximum function length, and explicit function return types; its suppression register may only shrink.
The UI must communicate with the server through shared contract types and must not redeclare governed wire types.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
**/*.{ts,tsx,js,mjs,json}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier formatting: 2-space indentation, double quotes, semicolons, 100-column width, trailing commas, and LF endings.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
**/*
📄 CodeRabbit inference engine (AGENTS.md)
**/*: Use English in code, comments, identifiers, documentation, commit messages, issues, and pull requests.
Respect the inward dependency direction:keiko-contractsis the leaf,keiko-securitydepends only on contracts, and cross-package types belong in contracts.
Inspect and reuse existing helpers, contracts, and subsystems; do not create parallel workspace, graph, policy, evidence, memory, connector, workflow, or UI subsystems without a documented capability gap.
Keep manifests, audit exports, diagnostics, logs, configuration, tests, and evidence redacted: never expose secrets, keys, raw content, endpoints, PII, memory bodies, or customer data.
Never weaken trust boundaries, evidence redaction, governance gates, required checks, or authority limits to make a change pass; fail closed.
Never directly push todev, force-push, bypass required checks, dismiss findings to obtain green status, or merge outside the approved direct-check path.
Use branch names in the formtype/short-slug, never work directly ondev, and use imperative conventional commit subjects with an issue or PR reference and no secrets.
Run the applicable local typecheck, lint, format check, tests, architecture checks, Sonar gate, and touched-area gates before claiming a change or pull request is green; report only commands actually executed.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
**/*.{ts,tsx,js,mjs}
📄 CodeRabbit inference engine (AGENTS.md)
Delete dead code instead of commenting it out and do not leave scaffolding or TODOs hiding unfinished branches.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
packages/keiko-ui/**/*.{ts,tsx,css}
📄 CodeRabbit inference engine (AGENTS.md)
When changing UI code or styling, preserve the SHA-pinned visual-proof and accessibility expectations and run the required UI gates.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
packages/**/src/**
⚙️ CodeRabbit configuration file
packages/**/src/**: Enforce ADR-0019 package direction and the owning trust boundary. Flag provider SDK imports
outside keiko-model-gateway, cross-package wire types outside contracts, workspace escape,
raw evidence bodies, silent failures, and parallel subsystems that should extend an owner.
Files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
🧠 Learnings (2)
📚 Learning: 2026-07-27T10:55:30.485Z
Learnt from: oscharko
Repo: oscharko-dev/Keiko PR: 2766
File: packages/keiko-server/src/qualityIntelligence/figmaSnapshotRoutes.test.ts:1738-1738
Timestamp: 2026-07-27T10:55:30.485Z
Learning: When reviewing TypeScript files, do not flag single-quoted string literals as a violation if they match Prettier’s formatter-approved output. Specifically, if Prettier is configured to prefer double quotes but retains a single-quoted literal solely because switching to double quotes would require escaping embedded double quotes, allow the single quotes (i.e., don’t “fix” it beyond what Prettier would produce).
Applied to files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
📚 Learning: 2026-07-27T18:08:22.461Z
Learnt from: oscharko
Repo: oscharko-dev/Keiko PR: 2780
File: packages/keiko-server/src/store/migrations.test.ts:78-95
Timestamp: 2026-07-27T18:08:22.461Z
Learning: When reviewing TypeScript lint findings (e.g., from typescript-eslint/no-unsafe-assignment), ensure the issue is reproducible using the repository’s configured ESLint setup/TS project settings. Do not treat diagnostics observed under a mismatched TypeScript project/tsconfig as authoritative; only accept them as real if you can reproduce them with the same ESLint configuration the repo uses (e.g., via its full/targeted lint scripts). In related test code, prefer deriving branded identity types from the production function return types to keep RootIdentity/brand fields type-compatible and avoid unsafe assignments.
Applied to files:
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
🔇 Additional comments (1)
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx (1)
37-37: LGTM!Also applies to: 43-47
| // The upload path (control + fail-closed parser) is not first-paint-critical: loading it as its | ||
| // own chunk keeps the setup page inside the static-export first-load budget (bundle gate). A | ||
| // failed upload-chunk load must not make the feature silently disappear from an otherwise | ||
| // working dialog — the shared fallback surfaces the redacted error and a retry (#3031). |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Remove the obsolete dynamic-loading comment.
GatewayConfigUpload is directly imported on Line 37. Lines 39-42 still describe a separate upload chunk, a chunk-load failure, and a retry fallback that this change removes. Delete these lines so the file documents the current behavior.
As per coding guidelines, do not leave obsolete scaffolding or dead implementation guidance in comments.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx`
around lines 39 - 42, Remove the obsolete dynamic-loading comment immediately
after the direct GatewayConfigUpload import. Delete the lines describing a
separate upload chunk, chunk-load failure, and retry fallback, leaving the
current GatewaySetupDialog implementation unchanged.
Source: Coding guidelines
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8945134731
ℹ️ 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".
| import { notifyGatewayConfigUpdated } from "../widgets/shared/gatewaySetupBus"; | ||
| import { DynamicChunkLoadFailure } from "../DynamicChunkLoadFailure"; | ||
| import type { GatewayConfigUploadFields } from "./gatewayConfigParsing"; | ||
| import { GatewayConfigUpload } from "./GatewayConfigUpload"; |
There was a problem hiding this comment.
Add a packaged-build regression for the upload control
Add a regression test that serves the static export through the packaged CLI and verifies that the upload input appears after opening this dialog. The existing GatewaySetupDialog.test.tsx imports and renders the dialog directly, so it passes with both this direct import and the broken nested next/dynamic implementation; without a packaged-path pin, the exact shipped-app regression fixed here can recur while the UI suite remains green.
AGENTS.md reference: AGENTS.md:L313-L314
Useful? React with 👍 / 👎.
Removing the nested next/dynamic boundary emits one static-export file less. Regenerated inside the pinned Linux gate container, not on macOS: only fileCount moves (335 to 334), every gzip measurement is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
Closing: the diagnosis behind this change was wrong. The config upload was never missing from the shipped 0.3.0 bundle. Port 1983 was held by an older
|




Summary
The
keiko.config.jsonupload control was absent from the shipped 0.3.0 desktop bundle.GatewayConfigUploadis loaded throughnext/dynamicfrom insideGatewaySetupDialog, which is itself already behind a dynamic boundary. In the static export the nested boundary never resolves — the chunk is served (verified: 200) but never requested — and theloadingfallback rendersnullwhile it waits, so the control silently never appeared. The same failure hid the audio endpoint fields added on #3048.Found by driving the packaged build as an operator: download the release asset, launch, look for the button. Every unit test renders the component directly and passes, so no test could see it.
Reuse / No-Duplication
No new mechanism — one import changed from
next/dynamicto a direct import.Verification
input[type=file]present, upload copy present, and the fix(gateway,ui): an audio endpoint move must restate its protocol, and the dialog can state it #3048 audio fields present again.keiko.config.json(6 providers, Azure Foundry endpoint) through the control: base URL, api-key header, timeout, generic deployments and both voice deployments fill in.typecheck, keiko-ui lint, prettier.Update-Impact
Behavioral: the setup dialog's upload control is reachable in packaged builds. No wire format, no server change. Initial-page bytes unchanged — the component already loaded only with the dialog.
🤖 Generated with Claude Code