Skip to content

Remove the early-key hold once startup is fast on slower machines too #4075

Closed as not planned

Description

@max-sixty

Remove the early-key hold once startup is fast on slower machines too. Keys pressed before the runtime upgrades or the first saved state lands are queued, a "Page still loading" chip appears after 150 ms, and the keyboard controller replays them (holdEarlyKeys in runtime/bootstrap.js, takeHeldKeys in keyboard/controller.js, INPUT_PENDING in keyboard/dispatch.js, the pending clause of scopeAvailable in keyboard/bindings.js). Without the hold, such a key is lost or runs the browser's own action, such as Space scrolling or / opening Firefox's Quick Find. Trigger: every example presents in about 250 ms both on this Mac and with Chromium's CPU slowed 4x, which stands in for a slower laptop as Lighthouse's mobile run does; then delete the hold, which a 2026-10-14 trial measured at 240 runtime and 540 test lines. This Mac is the fastest machine pages run on, so its reading alone would delete the hold where it still helps. The throttled bar is also 250 ms because the bar is how soon a reader presses a key after a page appears, which is the same on any machine. A throttled bar near 1 s would add nothing to the unthrottled one, since the throttle multiplied the medians below by 3.7 to 4.3. Take each reading as the median of five runs per example, with the Mac's load average beside it, of uv run leaf-dev probe EXAMPLE and uv run leaf-dev probe EXAMPLE --cpu-throttle 4, reading .startup.presented.at from the JSON line each prints. A probe reads a fresh server's first load, which is what a reader gets when an agent hands them a page. On 2026-10-19 the trigger had not fired. Reloading each example five times on one running server, the median startup.presented.at was 167 to 238 ms on six of nine examples, but 289 ms on code-comparison, 335 ms on command-hub and 487 ms on pr-walkthrough. With a 4x CPU throttle the same medians were 632 ms (triage-board) to 1826 ms (pr-walkthrough). On four examples, a server's first load took 120 to 230 ms longer than its reloads. The Mac's load average was near 12 on 18 cores throughout.


Migrated from TODO.md, Etc › Implementation candidates: item 26 of 40 in Etc, in the order TODO.md listed them.

Activity

  1. added
    backlog
    etc
    on Oct 25, 2026
  2. max-sixty commented on Nov 5, 2026

    @max-sixty
    OwnerAuthor

    Closing as postponed: nothing needs this before release. Removing the hold is a simplification gated on startup speed. Nothing a user hits depends on it, and the hold still protects slower machines.

    Reopen when: Every example presents in about 250 ms (median of 5) both unthrottled and under leaf-dev probe --cpu-throttle 4, read on an unloaded Mac. Then delete the hold.

    This was written by Claude Code on behalf of max-sixty

  3. added
    postponed
    and removed
    etc
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogpostponed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions