Skip to content

fix(app): more startup efficiency - #18985

Merged
adamdotdevin merged 1 commit into
devfrom
app/start
Mar 24, 2026
Merged

fix(app): more startup efficiency#18985
adamdotdevin merged 1 commit into
devfrom
app/start

Conversation

@adamdotdevin

Copy link
Copy Markdown
Member

No description provided.

@adamdotdevin
adamdotdevin merged commit 98b3340 into dev Mar 24, 2026
11 of 12 checks passed
@adamdotdevin
adamdotdevin deleted the app/start branch March 24, 2026 18:23
adamdotdevin added a commit that referenced this pull request Mar 24, 2026
adamdotdevin added a commit that referenced this pull request Mar 25, 2026
Andres77872 pushed a commit to Andres77872/opencode that referenced this pull request Mar 26, 2026
dzianisv pushed a commit to dzianisv/opencode that referenced this pull request Mar 26, 2026
Andres77872 pushed a commit to Andres77872/opencode that referenced this pull request Mar 26, 2026
dzianisv pushed a commit to dzianisv/opencode that referenced this pull request Apr 2, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
RobertWsp pushed a commit to RobertWsp/opencode that referenced this pull request Apr 16, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
rmk40 added a commit to rmk40/opencode that referenced this pull request Apr 28, 2026
The opencode-desktop:theme-preload vite plugin rewrote the canonical
external `<script src="/oc-theme-preload.js">` form into an inline
script at build time, trading a sub-millisecond round-trip on
localhost for inline-script CSP friction. With our embedded server's
strict CSP (`script-src 'self' 'wasm-unsafe-eval'`), the inline
form is blocked at runtime: theme preload silently does not run, and
the console shows "Executing inline script violates the following
Content Security Policy directive".

Drop the inline-substitution plugin. The source `index.html` already
declares the external form on line 19, so removing the plugin lets
that canonical form survive into `dist/index.html`. The external
script still runs synchronously in <head> before the bundle, so theme
load order is preserved; only the small fetch round-trip is added.

Alternatives considered:
- SHA-256 hash in CSP - brittle; any edit to the preload script
  silently breaks theme preload until the hash is regenerated, with no
  test that would catch it.
- 'unsafe-inline' - defeats most of CSP's value.
- Per-response nonce - requires server-side HTML rewriting on every
  GET; heavy for a tiny gain on a single-tenant tool.

Refs upstream PR anomalyco#18985 (the inline substitution).
Refs upstream issue anomalyco#18325 (the auth-loop bug that
surfaced this CSP regression).
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 participant