Skip to content

fix(ui): the config upload never rendered in the packaged app - #3053

Closed
oscharko wants to merge 2 commits into
devfrom
fix/setup-upload-missing-in-export
Closed

fix(ui): the config upload never rendered in the packaged app#3053
oscharko wants to merge 2 commits into
devfrom
fix/setup-upload-missing-in-export

Conversation

@oscharko

@oscharko oscharko commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The keiko.config.json upload control was absent from the shipped 0.3.0 desktop bundle. GatewayConfigUpload is loaded through next/dynamic from inside GatewaySetupDialog, 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 the loading fallback renders null while 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/dynamic to a direct import.

Verification

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

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>
@oscharko
oscharko temporarily deployed to keiko-for-quality August 9, 2026 09:09 — with GitHub Actions Inactive
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@keiko-for-quality

keiko-for-quality Bot commented Aug 9, 2026

Copy link
Copy Markdown

Keiko for Quality — run summary

COMPLETE · head fa16f39 · 2026-08-09T09:17:46Z · engine v1.8.4 · action 0c53cb11a924ba62dc2172316dee4ecf4a758360

Metric Count
Total paths 2
Reviewable 1
Excluded 1
Mechanically clean 0
Critical pointer changes (content not reviewable) 0
Replayed from cache 0
Cache miss (path-set shape changed) 1
Freshly reviewed 1
Findings published 0
Suppressed (intra-run duplicate) 0
Suppressed (exact duplicate) 0
Suppressed (similar) 0
Suppressed (dispositioned) 0
Suppressed (outdated recurrence) 0
Rejected (sanitization) 0
Rejected (placement) 0
Read-back failures 0
API failures 0
Duration (s) 12

Budget: 260780 tokens allotted, 41626 reported

Recent runs

  • fa16f39 · complete · fresh 1 · replayed 0 · 12s
  • 8945134 · complete · fresh 1 · replayed 0 · 8s

@oscharko
oscharko temporarily deployed to keiko-for-quality August 9, 2026 09:10 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@oscharko, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6d3e7c7c-fe68-44d2-9c2d-a34c9cf01a03

📥 Commits

Reviewing files that changed from the base of the PR and between 8945134 and fa16f39.

📒 Files selected for processing (1)
  • docs/release/1209-bundle-evidence.json
📝 Walkthrough

Walkthrough

GatewayConfigUpload now uses a direct import in GatewaySetupDialog. The dynamic loading fallback and chunk-failure handling were removed.

Changes

Gateway upload loading

Layer / File(s) Summary
Direct upload component import
packages/keiko-ui/src/app/components/desktop/modals/GatewaySetupDialog.tsx
The dialog directly imports GatewayConfigUpload and removes its dynamic loading fallback and chunk-failure handling.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: hendrikd2005

🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title uses a conventional prefix and describes the missing upload control, but its subject states a past problem instead of the required imperative delivered outcome. Use an imperative subject such as fix(ui): restore config upload in packaged app.
Description check ⚠️ Warning The description explains the fix and verification, but it omits multiple template sections, including Scope, Delivery Board, Product Impact, Review And Closure, and Risk Notes. Complete the required template sections and record issue references, impact classification, risks, local commands, reuse evidence, and closure status.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between c0774d2 and 8945134.

📒 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, forbid any, 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 of console.* 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}: The keiko-ui workspace 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-contracts is the leaf, keiko-security depends 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 to dev, force-push, bypass required checks, dismiss findings to obtain green status, or merge outside the approved direct-check path.
Use branch names in the form type/short-slug, never work directly on dev, 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

Comment on lines 39 to 42
// 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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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

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

Copy link
Copy Markdown

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: 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";

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 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>
@oscharko
oscharko temporarily deployed to keiko-for-quality August 9, 2026 09:17 — with GitHub Actions Inactive
@oscharko
oscharko temporarily deployed to keiko-for-quality August 9, 2026 09:18 — with GitHub Actions Inactive
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@oscharko

oscharko commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

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 Keiko.app installed in /Applications carrying the same 0.3.0 version string, so every launch of the downloaded package was measured against that old instance. Serving the shipped bundle on a free port shows the control, and loading a real keiko.config.json fills 13 fields.

next/dynamic was not the cause: restoring the nested boundary and rebuilding leaves the control present. Nothing here needs changing, so the source stays as it was.

@oscharko oscharko closed this Aug 9, 2026
@oscharko
oscharko deleted the fix/setup-upload-missing-in-export branch August 9, 2026 09:51
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