Skip to content

feat(edition): add onboarding and desktop branding seams - #11263

Closed
mrbeag wants to merge 2 commits into
kirodotdev:mainfrom
mrbeag:feat/edition-branding-seams
Closed

mrbeag wants to merge 2 commits into
kirodotdev:mainfrom
mrbeag:feat/edition-branding-seams

Conversation

@mrbeag

@mrbeag mrbeag commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let downstream editions brand first-run onboarding and desktop startup without patching core files.

Edition packages can brand the dashboard, but setup and Electron startup still expose stock artwork.

Why it matters

Without supported seams, editions must patch core files and repeatedly resolve the same conflicts while upgrading. Mixed stock and edition identity during setup or recovery also makes a packaged edition look incomplete.

Not a goal

  • Rebranding stock builds when no edition assets are supplied.
  • Publishing or qualifying a particular downstream edition installer.

What changed (motivation → approach → change)

To keep edition artwork in one place, onboarding now reuses ThemeBranding.logo for its lockup and accepts optional onboardingDecorations. The stock ghost and decorations remain the fallback.

To let editions own the desktop startup surface without patching Electron, packaging allowlist-validates an optional desktop/loading.html, stages it as edition-loading.html, and clears staged inputs on every exit. Local shell pages use a restrictive CSP and bridge: the three boot signals plus the minimize, maximize and close caption actions, so frameless-Linux title-bar buttons keep working; the main process still decides which actions it honours. Every file: document is treated as a shell page, so a page that rewrites its own path cannot escape the guard. Loading pages cannot navigate or open windows, and the token prompt may hand off only to its configured gateway origin. Electron removes stock and edition splash routes from Back history after handoff and recovery.

The HTML parser used only by staging is a build-time dependency. The extension, theming, and Electron contracts document the supported ownership and fallback behavior.

Backwards compatibility

Compatible: stock branding and desktop startup remain unchanged when an edition supplies no branding assets.

Tests

Rebased onto main at 7044e7550.

  • Focused onboarding branding tests: 6 passed.
  • Desktop packaging tests: 20 passed.
  • Full Electron test suite: 2,488 passed, 4 skipped, 0 failed. This includes new regressions for caption actions on every local shell page and for a renamed file: page staying confined.
  • TypeScript and ESLint clean.

Manual verification

The shared onboarding component was rendered with stock and generic edition inputs at desktop, 390 px, and 320 px widths. The packaged Linux Electron shell was booted against an isolated HTTP fixture; cold boot and liveness recovery both acknowledged boot-ready, reached the dashboard, and removed the splash from Back history.

Screenshots / video

Stock desktop

Edition desktop

Edition at 320 px

Packaged edition Electron boot

Related Issues

No linked issue; this adds supported edition seams.

Checklist

  • At most two commits with Conventional Commits titles
  • Existing tests pass and new tests cover the new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated
  • No secrets, credentials, or internal references in the diff

@mrbeag
mrbeag requested review from a team and Zedmor September 16, 2026 09:10
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — 🟡 CONCERNS

UX-level review of 035b2c612f0a8dac9448aadffb470461fd8d0517 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

No first-time reader has seen the edition onboarding lockup or the edition loading page. The four screenshots show every changed surface, but this fork lane has no blind read.

Watch

  • Decorations can sit behind body copy on narrow screens. onboardingDecorations renders across the whole aside (absolute inset-0 z-0), behind the panel copy. In attachment-03 (320 px), the edition ring runs behind "Set up your workspace…" and "Your settings stay under your control." The fixture's art is faint, so the text stays readable. A bolder edition artwork would compete with first-run copy on every small-screen setup. Severity: low. It needs an edition to ship strong art, and it hits only mobile and narrow windows. Fix: in theming-contract.md, tell editions to keep artwork low-contrast or clear of the copy at small widths.

[UX-REVIEWED] 035b2c6

Description read

[DESCRIPTION-READ] 92df3ecf6cf9700a6c1d78cdbb38f2ec97085bc82a5ce657be131e6d3a59a62c

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 035b2c612f0a8dac9448aadffb470461fd8d0517 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the token prompt's hardcoded http://localhost:<port> handoff still matches windowBackendUrl's origin for secondary-instance and remote-host windows. The new exact-origin guard blocks it otherwise.

[DESIGN-REVIEWED] 035b2c6

Description read

[DESCRIPTION-READ] c40f5dc43ea9d82c78b9088e3cd183c8ab574cdb8bf68d8dc545562b5391be7c

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 035b2c612f0a8dac9448aadffb470461fd8d0517 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 035b2c6

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — 🟡 CONCERNS

Premise-level review of 035b2c612f0a8dac9448aadffb470461fd8d0517 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

The splash sandbox (bridge filter, navigation guard, injected CSP, parse5) protects against an edition that already runs arbitrary code in the full-bridge dashboard.

Not justified as shipped

  • Item 4 — inherited: there is no named trust boundary between the edition's splash and its dashboard. extension-seams.md says the edition's own extensions.tsx is "compiled through the same Vite/Rolldown pass" into the dashboard. That dashboard keeps "the full bridge on the dashboard origin", according to the PR's own test. Fencing the splash (preload.js wrapper, isAllowedTransientShellNavigation, window-open deny, secureEditionPage + parse5) removes no capability the edition lacks. It also rewrites stock loading.html and token-prompt.html and their bridge, even though the description says "stock … desktop startup remain unchanged".
    Subtraction: delete the preload.js contextBridge wrapper, isLocalShellUrl / isAllowedTransientShellNavigation and their wiring, the CSP edits to the stock pages, secureEditionPage, and the parse5 dependency. Keep the copy-and-select seam: stage the file, resolveLoadingPagePath, the history entry, and the cleanup.
    Clears when: a named threat shows splash HTML is less trusted than the edition's dashboard code, or the layer is removed.

What this change ships

Inventory (7 items) — 6 justified

Intent: let downstream editions brand onboarding and desktop startup without patching core — ADDITION.

  1. Onboarding lockup shows the edition's existing theme logo — justified
  2. Editions can replace the onboarding mascot layer (onboardingDecorations) — justified
  3. Edition desktop/loading.html packaged and shown on boot/recovery, with stock fallback — justified
  4. Local shell pages get a restricted bridge, CSP, navigation and window-open lockdown, stock included — inherited
  5. Edition splash removed from Back history — justified
  6. Desktop build clears staged inputs on entry and exit — justified
  7. Docs for the new seams — justified

[FIRST-PRINCIPLES-REVIEWED] 035b2c6

Description read

[DESCRIPTION-READ] 4c668f8a8ccd203e692e77647d3d77fa0bcba2b1c3b261bd59b93e541f7d3d7d

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 035b2c612f0a8dac9448aadffb470461fd8d0517 via the fork AI-review pipeline; updated in place on each push.

Review details

Packaging can silently skip edition staging and its fail-closed checks.

FINDING — website/scripts/lib/editionDesktop.mjs:1241 — build-desktop.sh passes the logical pwd path as argv[1], while Node gives import.meta.url the symlink-resolved path. If the checkout sits under a symlink (for example macOS /tmp → /private/tmp), path.resolve(process.argv[1]) === fileURLToPath(import.meta.url) is false, so main() never runs and node exits 0. The edition page is not staged, the allowlist and KIROCREW_ALLOW_EDITION checks are skipped, and the build ships the stock splash without any error → Fix: compare fs.realpathSync(process.argv[1]) to fs.realpathSync(fileURLToPath(import.meta.url)), or call main() unconditionally from a separate CLI entry.

[OPUS-REVIEWED] 035b2c6

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 16, 2026
@mrbeag
mrbeag force-pushed the feat/edition-branding-seams branch from 884023d to abfc1ae Compare September 16, 2026 09:53
@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in abfc1ae: TRANSIENT_SHELL_PAGES includes edition-loading.html. The existing event-driven cleanup covers all four loading-page call sites.
Stock loading page: still removed after dashboard handoff. Edition loading page: removed after boot and repeated recovery. Token prompt: still removed after its renderer-driven handoff.
Active loading/prompt page: retained until handoff. HTTP dashboard routes: retained, including paths named edition-loading.html. POSIX and Windows file URLs are covered.
The edition regression replays boot through a token prompt and two recoveries while retaining the user's dashboard history. All 22 history checks and the full Electron suite passed (1,908 passed, four skipped).

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in abfc1ae: main.tsx calls lockProductName() immediately before scheduling the first React render. Later changes throw in development and are ignored in production, before either the seed or interpolation defaults can change.
Post-init, pre-render composition remains supported. Behavioral tests cover already-rendered and future copy in both modes, explicit call-time values, and harmless same-name or empty calls.
Removing the post-init update would restore the static-import ordering defect; locking at the actual composition boundary preserves the intended override and prevents mixed branding.

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in abfc1ae: the theming contract requires decorative artwork to preserve readable copy at every viewport width and copy length. It explains the near-white text constraint and recommends the panel's outer padding gutters.
Existing stock and generic edition screenshots remain representative; this revision changes the contract text, not the rendered artwork.

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in abfc1ae: removed the unused clean CLI mode and fs/path injection parameters. Cleanup remains an internal first step of staging, and the shell's entry/exit cleanup is unchanged.
This subtraction preserves the edition loading-page feature and stale-output protection without adding consumers solely to justify an unused API. The full Electron suite and all 46 packaging checks passed.

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

rebutted as a defect: this paragraph confirms that the onboarding fields, staging design and visual evidence are sound; it requests no change. The stock fallbacks, explicit edition opt-in, cleanup and representative screenshots are preserved.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 16, 2026
@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

rebutted as a required change: the shipped allowlist contains one fixed filename, and both shell cleanup paths remove that exact filename. There is no missing current cleanup branch.
Shell cleanup must work before the backend-only SKIP_ELECTRON exit and on failure; routing it through Node would add a dependency to those paths. The unused clean CLI was removed following the first-principles finding, while staging cleanup and shell entry/exit cleanup remain intact.
Future allowlist expansion should update and behaviorally verify every cleanup path together. A speculative expansion or a test that only mirrors the current filename would not strengthen the behavior this contribution ships.
Native edition installer execution remains explicitly unverified in the PR body. The evidence here covers staging, runtime page selection, boot/recovery history cleanup and rendered onboarding; it does not claim packaged edition startup qualification.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 16, 2026
@mrbeag
mrbeag force-pushed the feat/edition-branding-seams branch from abfc1ae to b8093cc Compare September 16, 2026 11:26
@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in b8093cc: ROOT and ELECTRON_DIR are followed immediately by shared entry cleanup and its EXIT trap, before OS/version validation or backend work. The late duplicate cleanup is removed.
A regression executes the real build script in an isolated incomplete checkout with stale marker and splash files. It fails at the stale-file assertion on the previous head and passes with this repair. All 37 marker/retry packaging checks passed.
Ordinary exit or packaging failure: EXIT cleanup removes both staged inputs. Backend-only exit: entry cleanup already removed them. Uncatchable termination: the next build clears leftovers before any validation can fail. A direct electron-builder invocation after an uncatchable kill without running this build entry point remains outside that entry point's control.

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in b8093cc: Desktop pre-boot branding documents onStatus, visible textContent status, onBootReady/bootComplete, the eight-second fallback, optional accent, reduced motion, and a minimal static-page example.
The PR body includes a screenshot from the actual Linux electron-builder --dir executable, rendering the generic edition page from app.asar through the unchanged main process and preload. It is not a browser imitation of the splash.
With an isolated HTTP gateway fixture, cold boot and liveness-triggered recovery each completed the handshake and removed the splash from Back history. Cold handoff was 808 ms. This qualifies packaged shell behavior, not a bundled Python backend, signed installer, or another OS.

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

fixed in b8093cc: the one-entry Map and staging loop are removed. Two filename constants describe the one supported input and packaged output. Validation still rejects non-files and unsupported names; the unchanged staging tests pass.

@mrbeag

mrbeag commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

rebutted with a concrete edition-owned static dependency reproduction: initialize-language.ts imports initI18n from @/i18n and calls initI18n('en'); extensions.ts imports that file, then calls setProductName('Orbit Crew'). Dependencies execute before the composition-root body even when core imports extensions first.
A production Vite build with the base i18n runtime and main entry reports initializedBefore=true and interpolation.defaultVariables.productName='Kiro Crew'. The otherwise identical repaired build reports initializedBefore=true and productName='Orbit Crew'. This is a focused interpolation probe with mocked HTTP endpoints, not full application qualification.
b8093cc clarifies that this is an edition-owned import graph supported by the new contract. It does not claim an existing stock-dashboard dependency initializes in the wrong order. The pre-render guard preserves the original prohibition on changing identity after rendering.

Minimal edition input used for the comparison:

// initialize-language.ts
import { initI18n } from '@/i18n'
initI18n('en')

// extensions.ts
import './initialize-language'
import { i18next, setProductName } from '@/i18n'
const initializedBefore = i18next.isInitialized
setProductName('Orbit Crew')
console.log({ initializedBefore, defaults: i18next.options.interpolation?.defaultVariables })

Built with KIROCREW_EDITION_DIR pointing at this directory and KIROCREW_ALLOW_EDITION=1. The existing product-name and lifecycle tests cover post-init/pre-render composition and refusal of post-render changes in development and production; all eight passed.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 18, 2026
@mrbeag
mrbeag force-pushed the feat/edition-branding-seams branch from cdc1919 to 033105a Compare September 18, 2026 20:48
@mrbeag

mrbeag commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the current-head blockers in 033105a14: CSP staging now locates the parsed document head (so a commented <head> cannot absorb the policy), the missing optional-theme test mock is restored, and the one-field onboarding namespace is flattened to onboardingDecorations. Post-rebase validation: 1,923 Electron tests passed, focused frontend regressions 6/6, TypeScript and ESLint clean.

@mrbeag

mrbeag commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the SKIP_FRONTEND=1 packaging blocker in 7d8bd68df: parsed-head CSP staging now uses parse5 from the desktop package, and staging runs only after desktop dependencies are installed. This preserves secure parsed insertion without depending on website/node_modules. Post-rebase validation: Electron 1,923/1,923, packaging regressions 20/20, focused frontend 6/6, TypeScript and ESLint clean.

@mrbeag
mrbeag force-pushed the feat/edition-branding-seams branch from 033105a to 7d8bd68 Compare September 18, 2026 21:27
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 18, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 19, 2026
@mrbeag
mrbeag force-pushed the feat/edition-branding-seams branch from 7d8bd68 to 2f4bec2 Compare September 19, 2026 13:54
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Sep 19, 2026
@dwu96

dwu96 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:

  • The gating blocker is the fenced security-class finding F1 (website/electron/window-lifecycle.js:70). The review comment states the fence keeps it blocking regardless of adjudication and that the only clearance path is a human override recorded by a repository writer who independently verifies the rationale. No code I can push clears that, so this is not mechanically drivable. It is also genuinely contested: the Opus adjudication concluded "the escalation step does not hold on the added code" and machine-flagged F1 as a likely edge case, while your dispositions rebut it as unreachable past the guard's second conjunct. Choosing between the fence, the adjudicator and your rebuttal is a maintainer call. If you want to pre-empt it instead, the adjudication names a low-cost shape — set a per-window flag in the main process at the token-prompt.html load site rather than reading getURL() — but that changes which file: documents keep the preload bridge, which is a trust-boundary policy decision I will not make on your behalf.
  • The UX CONCERNS verdict asks a human to confirm a trade you already documented: edition pages are withheld windowControl, so a stalled boot on frameless Linux leaves a splash the user cannot dismiss where the stock page reveals its exit. Keep the trust boundary as shipped, or expose the same close-only windowControl("close") to edition pages — your call, not mine.
  • The blind-read UX pass cannot run in the fork lane. Per that same review, a maintainer has to push this branch to the base repository to obtain it.
  • The branch is CONFLICTING against main and needs a rebase. This part I can do mechanically once the decisions above are settled — re-add needs-pr-triage and the next cycle will pick it up.

Not blockers, recorded so they are not re-litigated: all three backend failures are tracked flakes in files this PR does not touch — test/test_remote_crew_chaining.py (#14742, ephemeral hop-ownership port) and test/test_fence_marker_separators.py (#14826, wall-clock budget assert) — and Coverage Gate failed only because it fails closed on backend-test=failure, so it clears with them. PR Hygiene's later run at 09:51Z passed; the earlier 09:41Z failure is superseded.

When you've addressed these, the pipeline will re-assess on its next cycle. If you'd prefer no automation on this PR at all, add the pr-no-autofix label.

Copy link
Copy Markdown
Contributor

PR triage (2026-10-05) — #11263: REBASE + CONTINUE-DEVELOPMENT, keep open

I checked head 22091900 against merge-base 6a8cb5eb and current origin/main a92dde1a.

Coverage on main: none. origin/main has no edition-loading.html, no onboardingDecorations, no isAllowedTransientShellNavigation, and no CSP meta in loading.html or token-prompt.html. No merged PR implements this seam, so nothing supersedes it.

Rebase needed. The branch is 1071 commits behind, and a trial merge conflicts in two files:

Regression still open on stock builds. This was raised before by the Opus lane on preload.js:39, and this head does not fix it. The PR description says stock startup is unchanged, but on frameless Linux it is not:

  • token-prompt.html gets no kirocrew bridge at all, because of the if (name !== "electronAPI") return; branch.
  • loading.html forwards only close.
  • window-lifecycle.js still runs injectLinuxCaptionControls on every did-finish-load, and those buttons call window.kirocrew?.windowControl?.(action).

The result: on the stock Token Required page the minimize, maximize and close caption buttons do nothing, and on the stock splash minimize and maximize do nothing. On main today all of them work. I'm leaving this as a comment rather than a new change request because the concern is already on record.

Security finding F1 is still fenced. GPT flagged window-lifecycle.js:70 (the basename is mutable), and only a maintainer override can clear that fence. The adjudicator suggested a cheap way to make it moot: set a per-window flag in the main process at the token-prompt.html load site instead of reading getURL(). I don't consider it P0. The allow branch also requires target.origin === backend.origin, and the pre-PR tree had no navigation guard at all.

Overlap, not duplicate: #16566 (open PR) also narrows what preload.js exposes. It withholds local-only bridges for remote-crew windows using --kc-remote-gateway, while this PR wraps contextBridge.exposeInMainWorld for file: shell pages. The goals differ and the changes complement each other, but they touch the same expose calls. Whichever lands second must keep both filters: the local-only if (!REMOTE_GATEWAY) block must still go through the file: wrapper.

Recommendation: rebase onto main, restore caption controls for local shell pages (or record a maintainer decision to drop them), and settle F1. Then this is ready for maintainer review.

mrbeag added 2 commits October 9, 2026 08:23
Let editions customize onboarding decoration and stage a distinct desktop loading page while preserving stock fallbacks. Keep transient shell navigation constrained and preserve existing hide-to-tray behavior.
Restore the frameless-Linux caption buttons on every local shell page by
forwarding only the minimize, maximize-toggle and close actions; the main
process still decides which it honours. Guard navigation and window opening
for every file: document instead of matching a page name that
history.replaceState can rewrite. Keep the stock splash close control and the
build-only HTML parser.
@mrbeag

mrbeag commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto main (7044e7550) and addressed both open blockers at 035b2c612:

  • Caption controls regression (Opus lane / triage): every local shell page (stock splash, edition splash, token prompt) now gets kirocrew.windowControl, limited to the minimize, maximize-toggle and close actions the injected frameless-Linux buttons call. The main-process admission in handleWindowControl is unchanged: off Linux, only close from loading.html is honoured. This also gives an edition splash a way out when boot stalls on frameless Linux, which settles the UX CONCERNS item.
  • F1 (window-lifecycle.js, mutable basename): the navigation guard and the window-open handler now treat every file: document as a shell page, instead of matching a page name that history.replaceState can rewrite. A renamed page can no longer reach an external origin. Only the token prompt can hand off, and only to the window's own gateway origin. A new regression covers renamed file: pages.
  • Conflicts: OnboardingChapterShell.tsx keeps fix(onboarding): keep chapter footer on screen on narrow viewports #14911's hidden sm:block on the first two mascots inside StockOnboardingDecorations, and extension-seams.md keeps main's shell/branding.ts wording.

Electron suite: 2,488 passed, 4 skipped, 0 failed. Packaging: 20 passed. Focused onboarding tests: 6 passed. TypeScript and ESLint are clean.

Note for #16566: whichever PR lands second must keep both preload.js filters.

@iamwhatever

Copy link
Copy Markdown
Contributor

This PR adds edition seams for onboarding artwork and an edition-supplied Electron loading.html. Holding, not approving, for three reasons. It is a new product/extension feature at about 900 changed lines. It carries the needs-author-decision label. And it changes Electron security boundaries: the preload.js bridge filtering for file: shell pages, the CSP injected into staged edition HTML, and the navigation/window-open guards in window-lifecycle.js, where an earlier security-class finding (F1) needed a writer's human override. I read the description, the preload diff and the triage and author comments. I tried to get past the preload filter. Any document whose location.protocol is file: gets only onStatus, onBootReady and bootComplete on electronAPI and the three caption actions on kirocrew, and other bridge names are dropped. Preload re-runs on each navigation, so I did not find a bypass in the bridge itself. I did not verify the main-process handleWindowControl admission or the parse5 CSP staging end to end. Those, plus the edition-seam contract, need a maintainer's design and security sign-off before merge. — crew-pr-reviewer

@mrbeag

mrbeag commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Moving this back to draft while the design is agreed in #19805. That issue lists the decisions this PR needs from a maintainer: the preload bridge for local pages, window-control admission, the CSP for edition HTML, the navigation guards, and whether both seams are wanted. Once they're settled I'll rebase this to match, or close it if a different design is preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge needs-author-decision PR blocked on author input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants