Skip to content

Let Space pick rows in a tree that selects several, and give slow tests the time their work takes - #115

Merged
ww-mw merged 4 commits into
integration/allfrom
followup/keys-and-timeouts
Nov 9, 2026
Merged

ww-mw merged 4 commits into
integration/allfrom
followup/keys-and-timeouts

Conversation

@ww-mw

@ww-mw ww-mw commented Nov 7, 2026

Copy link
Copy Markdown
Member

Follow-ups on #114: Space in a tree that selects several, and the tests that kept timing out when the machine was loaded. Stacked on #114 (integration/all).

  • Space toggles a row in a multi-select <dex-hierarchy>, as the APG multi-select tree's Space does. Mod+Space still works.
    • On macOS, Cmd+Space usually goes to Spotlight and Ctrl+Space to the input source, so the keyboard toggle rarely reached the page there.
    • Shift and Alt with Space, Ctrl+Space on macOS, and a single-select tree are left alone.
    • Tests run on macOS and Windows; the docs and JSDoc follow.
  • The slow tests: the cause was mostly repeated work.
    • scripts/api-surface.mjs parses TypeScript's lib files once per process and target. check:api's output is byte-identical, and each surface takes 4.3 s → 1.0 s.
    • checkApiSurface cleans up each case's temp folder in a finally, instead of one afterAll that timed out.
    • iconSet scans core once.
    • dexIcon renders every base in one child process, still covering setIconBase both before and after define.
    • usageScopeEquality plans its corpus once.
    • The remaining waits and per-case timeouts are sized to each job's work, 2 to 10 times its measured cost. The global timeout is unchanged.
    • The dexIcon and widgetDocs children are killed at 30 s. A hung child used to hold its worker forever, since vitest's timer can't stop a synchronous spawn.
    • Measured: the slow files alone went from 41.7 s to 7.6 s. With two full suites at once, each had 2 failures before and none now.
  • Two stale dist/ files removed: connect/folderSearch.{js,d.ts}. Their source went in 0c311ae, but they still shipped. Nothing imports them.
  • A comment's dark-theme contrast figure is corrected to 4.55:1.

npm run verify passes, 7443 tests. The gallery's hierarchy and folder specs pass, 36 tests in four projects. The VS Code extension's unit tests (564) and typecheck pass against this build.

ww-mw added 4 commits November 7, 2026 15:11
…pace does

In a dex-hierarchy with multiSelect, plain Space on the focused row now takes it into the
selection or out of it, as the multi-select tree pattern's Space does. Mod+Space still does
the same. On macOS, Cmd+Space is Spotlight's and Ctrl+Space switches the input source, so
Mod+Space rarely reached the page there; Space alone does. Shift+Space, Alt+Space and, on
macOS, Ctrl+Space are left alone, and a tree without multiSelect leaves Space alone as before.
The JSDoc and the widget docs say so.

The tree table's comment on read-only ink over a wash gave the dark set's muted ink as
4.32:1 on the plain surface. That was #888; the token is #8c8c8c now, which gives 4.55:1 on the
lightest surface (#252526) and 3.4 to 3.7:1 on a wash, and the comment says so.
On a loaded machine (load averages of 14 to 58) a few tests ran past the 5 s default and the
10 s hook default, then passed alone. Each now does its work once, or is given the time that
work takes, with a comment saying what the work is. The global timeouts are unchanged.

- checkApiSurface: each case builds a TypeScript program for its small package, and most of
  what that program parsed was TypeScript's own lib files. api-surface.mjs now parses those once
  a process; the surface it reads is the same (checked on this package's own build: 1871 items,
  the same). The cases' folders are taken away with each case, not all in one afterAll hook,
  which is the hook that timed out. The cases get 20 s each.
- iconSet: core's dist was scanned twice, once for each case that reads its ids. It is now
  scanned once, in a hook given 20 s, and the scan helper keeps its answer. The SVG check reads
  every icon with one assertion over all of them, not one per file. The widget-source case gets
  20 s.
- dexIcon: the two plain-Node cases each started Node, happy-dom and the built module. One
  process now draws both icons, once, in a hook given 45 s. execFileSync kills it at 30 s, so a
  process that hangs fails the hook rather than holding the worker.
- usageScopeEquality: the exhaustive case planned the whole corpus twice, for the unscoped graph
  and for the probes. It plans it once now, and gets 20 s; each file's scoped graph is still
  built from nothing.
- widgetDocs: the generator check runs gen-widget-docs in its own process. It gets 45 s and the
  process is killed at 30 s. The case that parses every source file gets 20 s. Both failed under
  two suites at once.
- folder.test's Search view case: a folder change re-lists the folder and rebuilds the index,
  past the harness's 3 s waits under load. Its waits get 15 s and the case 45 s.

folderGraphSources needed no change here: on this branch it waits for the tree's hierarchy
build rather than a quiet spell, and it took 62 to 138 ms alone and under load.
The hierarchy's Space toggle in a multi-select tree, its JSDoc in custom-elements.json and the generated part of its widget docs, and the tree table's corrected comment on the dark set's muted ink.
…ed, word Space plainly, and drop dist files with no source

api-surface.mjs keys its cache of TypeScript's lib files by the compiler target as well as the
file, so a program with other options would not take a lib file parsed for another target.

The plain-Node icon run draws from a base set before defineIcon again, beside the base set
after it. A second instance of the built module, whose base nothing has set yet, gets
setIconBase first and is then defined under a tag of its own. The run checks it is a module of
its own, so the case cannot pass by drawing the first module's base.

The docs say Space on the focused row toggles it, Ctrl+Space too outside macOS, and the JSDoc
says "Space (or Mod+Space)".

dist/widgets/app-shell/connect/folderSearch.js and .d.ts have had no source since 0c311ae
but still shipped. Nothing imports them (source, tests, gallery, scripts, package.json's
exports and custom-elements.json name neither), and a fresh build makes neither, so they go.
@ww-mw
ww-mw merged commit f514241 into integration/all Nov 9, 2026
@ww-mw
ww-mw deleted the followup/keys-and-timeouts branch November 9, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant