Skip to content

Fold the Inbox's Fleet machines list closed on each page load - #2305

Merged
JacobStephens2 merged 6 commits into
mainfrom
issue-2299
Nov 19, 2026
Merged

JacobStephens2 merged 6 commits into
mainfrom
issue-2299

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Inbox's per-machine list now starts folded on every page load, so Needs you, Working, Landing and Ready for review sit higher on Overview. It works like the existing Last recorded skipped Passes disclosure: a native <details> with no open attribute, kept out of folds.js, so no choice carries over to the next load.

 <main id="inbox">
   <form class="machine-filter">…</form>
-  <ul class="fleet-machines" aria-label="Fleet machines">…</ul>
+  <details id="fleet-machines">            <!-- no open: folded on each load -->
+    <summary>Fleet machines <span class="count">N</span></summary>
+    <ul class="fleet-machines" aria-label="Fleet machines">…</ul>   <!-- lines unchanged -->
+  </details>
   <nav class="folders">…</nav>

The wrapper appears in every Inbox folder. Live updates keep whatever state the reader left, because morph() already refuses open updates on details. Machine lines still refresh inside it. CSS is unchanged: #inbox > * already placed the list in the content column. console/README.md, site/index.html and site/how-it-works/index.html now describe the fold.

Evidence

Execution evidence

  • Before (unpatched template, new test): cd console && node --test --test-name-pattern="slow or old" tests/fleet.test.cjs
    not ok 2 - Fleet makes no requests without a page and a slow or old machine cannot block a good one
      error: |-
        locator.evaluate: Timeout 5000ms exceeded.
        Call log:
          - waiting for locator('#fleet-machines')
    # pass 0
    # fail 1
    
    After: cargo build --locked && cd console && node --test tests/fleet.test.cjs
    ok 1 - Fleet Inbox polls with page subscriptions, retains rows, and fits a phone
    ok 2 - Fleet makes no requests without a page, a slow or old machine cannot block a good one, and the machines list starts folded
    # pass 2
    # fail 0
    
    The tests check:
    • the list starts folded and stays folded through a live update;
    • a click opens it, and it stays open through a live update that changes a machine's active count;
    • Space and Enter toggle it;
    • a reload folds it again;
    • without JavaScript at 390×844 it starts folded and opens on click;
    • once opened, a long machine name does not overflow at 1440 or 390 width.
  • scripts/affected-tests origin/main on 9d00ae4:
    • PASS: npm test --prefix site, cargo build --locked, npm test --prefix console. The Console run includes the inbox fix described under Review.
    • FAIL: cargo test (nextest is not installed here).
      • cargo test stopped at its first failing binary, tests/scoring.rs, after unit tests and 84 binaries passed. packet_blinding_preserves_source_binary_files_and_symlinks asserts the copied executable keeps 0o111 and got 0o110.
      • This session's scratch TMPDIR has a default ACL that drops "other" bits on copies: cp of a 755 file produced -rwxr-x---+.
      • cargo test --no-fail-fast then ran the 31 binaries that had been skipped. Thirty passed. The one failure was tests/trial.rs a_scoped_hog_leaves_journal_oom_evidence, which reads this host's journalctl --user for an oom-kill record.
      • Neither failing test touches the Console, src/console/inbox.html or anything else changed here. CI should settle both.

Visual evidence

These captures use faux seed-home.cjs data and the hostname verify-host.

Before — Console Inbox Overview, desktop 1440×900

Before: Inbox Overview at 1440×900, the Fleet machines list shown expanded above the active runs total

After — Console Inbox Overview, desktop 1440×900 (on load)

After: Inbox Overview at 1440×900, the Fleet machines list folded to its summary and count

After — Console Inbox Overview, desktop 1440×900 (summary clicked)

After: Inbox Overview at 1440×900 with Fleet machines opened, showing the unchanged machine line

Before — Console Inbox Overview, mobile 390×844

Before: Inbox Overview at 390×844, the Fleet machines list shown expanded above the folder tabs

After — Console Inbox Overview, mobile 390×844 (on load)

After: Inbox Overview at 390×844, the Fleet machines list folded to its summary and count

Review

Both the Standards and Spec reviewers read all five files in the reviewed commit, and there were no generated-output exclusions.

Changed file the review left unread: console/tests/inbox.test.cjs, changed after the review in 9d00ae4. In the active-run test, the wait for "every section hidden" counted every #inbox > details, including the new, never-hidden Fleet machines disclosure. It now counts only #inbox > details.group:not([hidden]). That test failed in the Console browser suite before this fix and passes after it.

  • Standards (3, all fixed in a96a653):
    • The slow-machine race assertion moved ahead of the fold interactions, under CODING_STANDARDS.md "Deadlines in tests".
    • The test name now mentions the fold.
    • The repeated locators are now shared.
  • Spec (1, fixed in a96a653): an opened-list overflow check with the long machine name, at desktop and phone widths.

Unaddressed findings

Standards: None. One partial adoption: finding 2 suggested splitting the fold checks into their own test or extending the name. I extended the name, because the fold checks need the same multi-machine Fleet fixture (console/tests/fleet.test.cjs, second test).

Spec: None.

Security: None. The change wraps the existing Fleet machines list in a static <details> whose only new interpolation is the auto-escaped integer machines.len(). It adds no input, sink, route or script, and leaves the machine lines' escaping and links unchanged.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Template and documentation only. Reverting the commit restores the always-expanded list.

Blast Radius: cosmetic

The Inbox's per-machine list needs one click to read. Nothing persists, and no API, CLI or Theme output changes. External browser automation that read .fleet-machines li as visible would now see it hidden until the summary is opened.

Closes #2299

Built with claude 2.1.322 · claude-opus-5-5 · high

Wrap the per-machine list in a native details disclosure without open, like
the skipped-Passes disclosures, so Needs you sits higher on Overview. Live
updates keep the reader's open or closed state.

Closes #2299
Check the slow-machine race before the fold interactions, name the folded
list in the test title, reuse the summary and line locators, and check the
opened list fits a long machine name on a phone.
The Fleet machines disclosure is also a details child of the Inbox and is
never hidden, so the active-run test waits on details.group instead.
@JacobStephens2
JacobStephens2 merged commit ece70dc into main Nov 19, 2026
25 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-2299 branch November 19, 2026 15:28
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant