Skip to content

Layout sunset hard-codes the new layout with no override for desktop users #49005

Description

@Yuanixx

Layout sunset hard-codes the new layout with no escape hatch for existing desktop users

When the oldInterfaceSunset date passes, desktop users who want to keep the original ("legacy") layout are stuck with the new layout and receive a dismissible notice instead of a toggle. This is a product decision, but there is currently no opt-out or override, and the related threads below have been open for months without a response.

Related (all appear to be the same root cause):

Root cause

All interactivity is gated on oldInterfaceSunset in packages/app/src/context/settings.tsx:

  • oldInterfaceSunset = new Date(2026, 8, 14) (line 63) — once Date.now() >= this, the hub retires the old interface.
  • resolveNewLayoutDesigns(retired, preference, fallback) (line 129) — if (retired) return true ignores any saved user preference.
  • layoutTransitionState (line 116) — available: scheduled && eligible && !retired hides the Settings toggle entirely after the sunset.
  • setNewLayoutDesigns (line 432) — const next = oldInterfaceRetired() ? true : value blocks switching back after the sunset.
  • The effect at line 340 force-sets newLayoutDesigns = true once retired.

There is no environment variable, config key, or CLI flag that overrides any of this.

Verified local workaround

For desktop builds (Electron asar), replacing the following byte-for-byte keeps the toggle available and lets users stay on the old layout:

  1. if (layoutUpgrade()) return true → an empty if (layoutUpgrade()) {} block (removes the force-intro of the new layout for upgraders).
  2. new Date(2026, 8, 14) → a far-future date (e.g. new Date(2099, 0, 14)) so oldInterfaceRetired() stays false and the Settings toggle remains available.

Caveat: in the minified renderer bundle (strict-mode ES module), the replacement must avoid a leading-zero numeric literal (new Date(2099, 0, 01) is an octal literal and throws SyntaxError: Octal literals are not allowed in strict mode, which crashes the whole renderer on startup).

Feature request

Please provide a supported, durable path for existing users to stay on the original layout, for example:

  • An environment variable or setting (e.g. OPENCODE_USE_LEGACY_LAYOUT=1) that keeps the toggle available regardless of the sunset date, or
  • Treating the sunset as "default to new, but respect an explicit saved preference" instead of hard-forcing the new layout (i.e. drop the oldInterfaceRetired() ? true : value gate and the force-set effect), which is what the workaround above effectively does.

If the sunset must stay, a reprieve (like earlier postponements) plus a documented override would still let long-time users keep their preferred interface.

Activity

  1. github-actions commented on Sep 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Since this issue itself lists several of these as related, it may be more productive to consolidate the discussion in one of the earlier threads rather than opening a new one. The maintainers can decide whether to keep this open or close as a duplicate.

  2. yun-langdeng commented on Sep 16, 2026

    @yun-langdeng

    I've been affected by this since the sunset date. Two specific pain points:

    1. Switching sessions requires navigating to the home page first - in the old layout, the project sidebar with sessions was always visible, so switching was one click. Now it takes an extra step every time.
    2. Tab titles don't show project name or path - I work across multiple projects and can't distinguish which project a tab belongs to without hovering. Issue [FEATURE]: Allow the project and session sidebar to be used alongside session tabs #37273 captures this.

    The asar patching workaround breaks on every update. A simple env var like OPENCODE_USE_LEGACY_LAYOUT=1 would solve this immediately. +1

  3. kuznecov-anatoliy commented on Sep 16, 2026

    @kuznecov-anatoliy

    Built an unofficial Windows build that restores the old layout while this
    gets sorted upstream — keeps the legacy sidebar available past the sunset
    date instead of forcing the new layout:
    https://github.com/kuznecov-anatoliy/opencode-old-interface

    Not affiliated with the team, just a stopgap. Happy to also open this as a
    PR against dev if useful, since the root cause is already pinned down here.

  4. davidlopezsalvador commented on Oct 8, 2026

    @davidlopezsalvador

    You nailed the mechanism - oldInterfaceSunset really does hard-code the new layout with no escape hatch. Until an official override lands, this is a working escape hatch (Windows Desktop):

    https://github.com/davidlopezsalvador/opencode-legacy-patch

    How it works: a same-length patch inside app.asar moves oldInterfaceSunset to 2099, so resolveNewLayoutDesigns(retired, ...) stops hard-coding the new layout, and app-update.yml is neutralized so the auto-updater cannot silently wipe the patch.

    • Tested on 1.18.34 -> 1.18.35 (Electron 42, Windows); applies with the app open in ~2 minutes; one-command rollback (-Mode restore).
    • Fail-safe: the script searches the literal dynamically and aborts unless it finds exactly 1 occurrence.
    • Caveats: Windows desktop only; updates frozen until you restore -> update -> patch (script included); unofficial, use at your own risk.

    I maintain the repo, feedback welcome. This is only a stopgap until a permanent official toggle ships.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions