Skip to content

feat(console): Dashboard, a live build dashboard in place of Bazel's terminal UI - #1693

Open
gregmagolan wants to merge 87 commits into
mainfrom
console-fullscreen-poc
Open

gregmagolan wants to merge 87 commits into
mainfrom
console-fullscreen-poc

Conversation

@gregmagolan

@gregmagolan gregmagolan commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Ships Dashboard, a live dashboard of a task and its builds in place of the console and Bazel's terminal UI, with the CLI, for build, test, lint, gazelle and format. It's off by default; try it with --dashboard:

aspect build //examples/dashboard:demo --keep_going --action_env=CACHEBUST=$RANDOM --dashboard
aspect test //examples/dashboard:demo //examples/dashboard:tests --keep_going --action_env=CACHEBUST=$RANDOM --dashboard

What it shows:

  • From the task's start: the screen is taken in a pre-task hook. The header names the task's phase until a build runs. Failures, Metrics and Invocation are muted (No build yet) before one.
  • Header and build panes: the header names the task, how long it has run, and while a build runs 4 of 14 actions done (or loading/analyzing/starting before Bazel counts); after the task, only what ✔/✗ cannot say, from BuildFinished (interrupted, ended without a result). No progress-bar row: the panes sit under the header, one height for the whole build, the Running list scrolling in it. When a build ends it folds to a row with the actions it ran (from BuildMetrics); p opens it again, and </> pick a build in Metrics and Invocation.
  • Slowest: from the execution log, every spawn that ran, cache hits left out, to a tenth of a second.
  • Keys: one table drives what each key does, the keys row and the ? overlay, which is grouped (Scroll, Search, Failures, Screen, Leave) and leaves out keys that don't apply now. A toggle (w, e, z, m, p, a, Ctrl+O) says in the keys row for two seconds what it left and how to undo it (long lines cut · w wraps them).
  • Tabs: Console (the task's whole output), Failures (logs, attempts, runs, shards, a peek at the source), Metrics, Invocation, and last Tips (s silences one on this machine). o opens a file only in an editor, never through a file:// link.
  • Times and counts: each running action's time is coloured by its age (muted, then warning, then error), as BuildBuddy's theme colours Bazel's progress area, and the header's time is drawn out of the status bar's reverse video, in the accent colour and bold, so it stands apart in every theme, mono included. Results' cache row counts spawns (Cached 4% of 1,452 spawns): what the execution log has seen run or come from a remote or disk cache, not the header's N of M actions done, which is Bazel's count of every action, including those its own action cache satisfies and its internal ones. Every count has thousands separators.
  • A tool's line coloured like Bazel's status line (ESC[32mINFO:ESC[0m two, the colon inside the colour) is the tool's: inside an action's output it is neither erased as Bazel's progress area nor taken for the start of a block (Ctrl+O folds it with its action). After --test_output=streamed, which never ends, only a bare status row, as Bazel's own always is, counts as Bazel's.
  • Iterators beside the caller's own execution log: Bazel takes one log format, so with --execution_log_binary_file or --execution_log_json_file (an empty value clears it, as Bazel reads it) the CLI adds no compact log for execution-log iterators that only read entries: an exec_log_event hook's (the Dashboard's) and a task's own ctx.bazel.build(execution_log = [iterator]) alike end with no entries, the task's own with a warning, rather than have Bazel refuse the build. The Dashboard's Metrics then says spawns: not read: this build writes its own execution log (--execution_log_binary_file), and Results shows no cache row.
  • Counts, one definition: a target that failed for a dependency that failed in the build is blocked, not failed, in Results, Metrics and the summary, whichever Bazel reported first, a dependency that failed analysis unasked included, which is listed as a failure of its own, its log Bazel's error (a missing source file is the target's own failure). A test whose summary is Aborted is failed where an attempt failed to build and skipped otherwise (a build without --keep_going stopped first, or a flaky test's later attempt was cut off), and, under test or coverage, a test target that failed to build or was blocked is failed: Bazel's own counts. An attempt Bazel posts twice is one Failures row, the one with its log; a failed TestRunner action is the attempt after the last whose result came (its run and shard from its testlogs folder), dropped once that attempt's result comes with a log, else its row is that attempt's. Metrics says after the build for spawns until the execution log is read; a successful build that ran nothing but Bazel's workspace status says nothing ran.
  • On exit: the scrollback is the task's output.ansi from where the screen was taken, re-linked, then a summary. The dump is written as part of the release, with every writer held from the main screen coming back, so no line printed meanwhile shows twice or ahead of it. A forced exit and a panic dump it too; a crash ends with output: <path>.

What changes for tasks under any run, not only the dashboard's:

  • lint's auto-fixes are applied to copies of the files each patch names (both sides, with their directories, and patch's temp files kept there) and copied back by their bytes, so patch's .rej/.orig files never touch the user's. A file is removed only where its header's new side is /dev/null, with BSD and GNU patch alike: a fix that empties __init__.py leaves it empty. A fix to a file that isn't there is named in an INFO line, and a patch with a malformed hunk range is skipped with a warning. Lint outputs count as complete by their byte length, read lossily, so a patch with a Latin-1 line applies rather than timing out. A patch identical to one already applied in the run is skipped, hunks patch ignored as already applied (and only those) aren't reported as rejects, and a patch naming a path outside the tree is refused. Real rejects are kept apart, and a line says where. A patch's relative path (a remote cache's lint output) is taken in the workspace, and one that isn't there is named in a warning. A patch patch can't read in full (exit 2 or a signal) is applied not at all, not even the files before the bad hunk. A patch is refused whole, before anything is copied, with a warning naming the path and why, where two named paths are one file by the filesystem's own identity (dev, ino), symlinks followed: a type change, two creations, a rename onto a made file, a hard link, or a case- or normalization-only rename where the disk takes the names as one. Also where a path has a . or empty component, isn't a regular file, goes through a file or a directory it may not look in, has symlinks leading out of the workspace or to nothing, or is a symlink the patch would remove; or where the patch is past the 64 MiB read cap. A symlink within the workspace is followed. The copies are checked the same way once made and again once patched: two files in the workspace that are one where the patch is applied (a case-sensitive checkout, a temp dir that folds case or Unicode) refuse it, nothing copied back. Header names are read as patch opens them (to a tab, else to the first space): a name with a space and no tab after it, a git-quoted name, a git mode, rename, copy or binary header, or a non-regular mode (120000) refuses the patch, and so does a named path patch would write its .rej, .orig or .~N~ over. Once patched, nothing but regular files is copied back: a symlink patch made, or a file gone unasked, refuses it. Paths in warnings are escaped. A file a patch makes that is there already (not empty) is made apart from it, with BSD and GNU patch alike: the same bytes count as applied already, other bytes keep the file and the hunks as a reject.
  • Output order without stalls: a child's output is routed under its stream's order lock, which a release takes while it replays but never across a write to the terminal. A forwarder never sits inside a blocking write: it waits for its stream to be writable, then writes a chunk the pipe takes whole. That matters because macOS's dup2 over a FIFO waits out a write in flight, which stalled a screen's take. A stdout nobody reads (a FIFO, a pager) therefore holds up only its own child: not a take, not stderr, and a release's stdout replay for at most 2s. Every write to fds 1 and 2 (the CLI's own lines, the AXL streams, the build console, forwarders, dumps, replays) takes one lock per target, shared when stdout and stderr are one file or terminal. So no two writers' lines are ever spliced; a dump waits briefly for a child's line to end. Moving the descriptors in or out of a screen's capture holds every target, so a Ctrl+Z leaves output.ansi whole too.
  • q cancels the run's root token once, so Bazel gets one interrupt sequence.
  • Children: an unmarked child (ctx.std.process.command) reads /dev/null and has its stdout and stderr piped through the CLI: flushed as they come, copied to output.log a line at a time (under the Dashboard, handed to its console a line at a time), and passed on until its pipes end, for 2s at most after it exits. FORCE_COLOR/CLICOLOR_FORCE are set when its stdout reaches a colour terminal, unless the task or the CLI's own environment sets them. A child marked .interactive(True) gets the real terminal when there is one, in the CLI's own process group (so Ctrl+Z, fg and bg are the shell's), with marker lines before and after it; without one (CI) it is piped like any other. .interactive(True) with process_group(...) is refused at spawn. aspect run passes its program the CLI's stdio explicitly.
  • A process that outlives the CLI sets its own stdout and stderr (a file from ctx.std.fs.create(...), "null" or "inherit") and leads its own group with process_group(0). One backgrounded by an unmarked child keeps that child's pipe: its child's wait, and then the CLI's exit, each wait for it for 2s at most, and then it dies when it next writes.
  • Prompts: a read of stdin on a terminal, and an interactive child, suspend the screen and resume it after. Under the screen, an unmarked child also has no controlling terminal, so a surprise prompt fails rather than hangs.
  • Ctrl+Z: while a screen holds the terminal, Ctrl+Z gives it back, stops the CLI, and takes it again after fg: redrawn at the size it was drawn for, else cleared for its next frame, which reads the size anew.
  • Hand-off to a child or prompt: answers to the screen's own terminal queries still on their way (OSC 11's DA1, the wheel query's) are read out and dropped first, then unread keys typed for the screen are flushed, so the child never reads them as input. The screen is cleared before it is left.
  • The CLI's own output is one ordered channel: its lines and diagnostics, the AXL streams and the build console's forwarded lines each take their target's write lock and are offered to a route first. While a screen holds the terminal they go straight to its console and replay, never through the captured fds 1 and 2. Otherwise they go to fds 1 and 2. This removed copy_output (a no-op while a capture copied), the windows where a CLI print racing a screen switch was copied twice or not at all, and CLI output stalling on a capture's pipe. The capture of fds 1 and 2 remains only for stray writers (code writing to the descriptors directly, a panic's message) and children given the CLI's own stdout.
  • Idle hook: ctx.hooks.idle(fn) runs about every 100ms while the task waits on a child or sleeps.
  • Terminal-only tips: a tip listing SURFACE_CLI without SURFACE_DASHBOARD is kept out of the screen and dumped in its place.

Known limitations:

  • Text a task marked ansi.unlinked is linked again in the dump and in the Console's first lines: output.ansi keeps colour, not those markers.
  • A child marked interactive that is spawned and never waited on keeps the screen given back until the task ends.
  • The suspend/resume path through a real stdin prompt is covered by its pieces' tests; an interactive child's, Ctrl+Z's and fg's by pty tests and goldens.
  • Moving fds 1 and 2 in or out of a screen's capture waits at most 100ms per target for a writer to finish. On macOS a dup2 over fd 1 or 2 also waits for a write blocked on it. A write by the build console, the flush of std's stdout buffer, or a telemetry sink, blocked on a stalled stdout, can therefore hold up a take, release, Ctrl+Z or fg, with the screen's lock held, until that destination drains. Forwarders write through descriptors of their own and don't cause this.
  • A narrow window can still copy a line to output.log twice or not at all: a child's line written into a stopped capture at the instant of fg.
  • A partial stdout line std still buffers when a screen is taken, to a stdout that isn't the terminal, comes out after the release with the next write through std. On the terminal the dump flushes it first.
  • aspect run's program keeps the CLI's own stdin, stdout and stderr, as before: its output is not in output.log.
  • A second Ctrl+C while a dump is being written ends the CLI at once, which can cut the dump mid-line or mid-colour; reset puts the terminal right.
  • A line left unended when a screen is taken shows its start again after the screen: the dump starts a line of its own rather than erase a row the CLI can't tell is only its own (a child's inherited output, a pipe to the same terminal). A question answered at the prompt a screen gave back for (QUESTION? y) shows again as the files have it (QUESTION? ANSWERED). Nothing is lost and no row is erased.

#1197 gives a feature the console side:

  • output_display = "none";
  • build.output_feed();
  • BazelTrait.output_frame hooks.

This PR adds the terminal side and the feature.

  • ctx.std.term: take() gives the controlling terminal to a feature as a screen. The screen has:

    • the alternate screen;
    • keys without echo, read with screen.key(); Shift+arrows are named too, and once mouse(True) the wheel and the left button's presses, drags and releases with their cell (mouse-press:<col>:<row>; released with the screen);
    • size();
    • write(), which draws a frame in one write;
    • interrupt(), which does what Ctrl+C does;
    • interrupts(False), which turns Ctrl+C into a key.

    Ctrl+C still signals by default. While the screen is held, the CLI's own output goes to the screen through one ordered channel, and the process's stdout and stderr are captured, for stray writers and children given the CLI's stdout. screen.output() hands them to the feature, and release() writes each back to its own stream. A child still holding the capture pipe gets its later writes copied through. A held screen is released:

    • when the CLI's run returns;
    • on the CLI's forced exit, without the screen lock if a frame holds it;
    • on a panic;
    • in a build with frame hooks, when a console hook (frame, intercept or end) or wait() fails;
    • on a crash: the crash handler restores the terminal first, so its report reaches it.
  • ctx.std.fs.try_read_tail(path, max_bytes): a file's last bytes, from a line's start (a character's when no whole line fits), and how many were left out; None on any I/O error. For a failing test's log, whose end is where its failure is.

  • ctx.std.re: regular expressions in Rust regex syntax, linear-time whatever the pattern. compile(pattern, case_sensitive =, whole_word =) gives a Pattern with search, filter(lines), replace(text, repl) and highlight(text, before, after), each one call for a whole frame's lines. check(pattern) returns the error, since Starlark has no try.

The feature is AXL (feature/dashboard.axl) on top of the runtime pieces below.

  • Panes. A header with a bar of Bazel's [n / m] actions. Running actions, oldest first, yellow past a minute and red past five; Running (N) counts from Bazel's status line, so a remote build's hundreds of actions are counted though Bazel lists only 8. A Results pane with target and test counts, cache hits from their sources of truth (actions' from the compact execution log, tests' from their results), and the failures counted. Each results page the invocation has as an OSC 8 hyperlink: the Aspect Build Results page the CLI streams to, and the BES page Bazel streams to itself with --bes_results_url (OpenInvocation's results_pages builds both).
  • Tabs. The main pane has five, always in the same order: Console, Failures, Metrics, Invocation and Tips. Tab and Shift+Tab cycle them, a click takes one, and the pointer over one lights it. Metrics: spawns and how many a cache served, by runner (from the execution log); Bazel's action cache; test runs and how many were cached; targets built, failed and blocked; elapsed, critical path, analysis, execution and CPU time; peak heap; the slowest actions. Invocation: the command, invocation id, Bazel version, workspace, exit code, the results links, the flags and startup options given, workspace status and build metadata, with anything that may be a secret redacted.
  • Failures tab. Each failed action and each test attempt that didn't pass, by shard and run when a test has several, then, dimmed, the failed targets with no log (a loading or analysis failure, or a target failed by a dependency). ↑/↓ choose, Enter shows the log in the console pane: an action's stderr and stdout, or a test's test.log, its end when long. A test log a remote cache names by bytestream:// is found in the output tree once the test's summary has come; before that the view says so rather than guess, and updates when it comes. ]/[ step to the next or previous failure, its log shown, from anywhere; Esc goes back to what a log or file was opened from.
  • Actions list. With --dashboard:actions=all (which adds --build_event_publish_all_actions), a switches the list to the actions that succeeded and wrote output, browsed the same way.
  • Scrolling, less-style, none needing a key a MacBook lacks (no PgUp, Home, F-keys or Option): ↑/↓ or k/j; Shift+↑/↓, u/d and Ctrl+U/D half the console; Space/b all of it; Shift+K/J (or Home/End) oldest and following; the mouse wheel, three lines a turn, the screen taking the mouse so the terminal never scrolls up past it (m or --dashboard:mouse=false gives it back to the terminal, its wheel then sent as ↑/↓). Scrolled up, the console counts the lines that arrive (12 new, J to follow); that state (following, lines up) sits at the right end of the tab border, bold in the accent colour, apart from the tabs. z gives the console the whole screen.
  • Search. Ctrl+F or / opens a regex bar that jumps as you type to the newest match at or above the view, marks and centres it, and highlights every match; n/N step older and newer, and Esc clears it and goes back to where the bar opened. Tab in the bar filters to the matching lines instead. Smart case: a capital in the query matches case, and Ctrl+T (or Alt+C) forces it; Ctrl+B (or Alt+W) whole words; Ctrl+W (or Alt+Backspace) deletes a word. A paste types into the bar on one line. e cycles the console through all lines, errors and warnings, errors only. Scrolling, e and search work on a log as on the console.
  • Keys. The bottom row shows the keys for what has focus, as many as fit, ending in ? keys; ? shows them all. Esc closes the innermost of the bar, the list's focus and a log. q cancels.
  • Ending. When the task ends, the screen stays up whatever the outcome, its tabs browsable, until q, Enter or Esc with nothing open, or Ctrl+C (read as a key there, so it doesn't cancel a task that has already ended); its keys row says Done ✔ · q, Enter or Esc to leave. --dashboard:stay=failure stays only when something failed and otherwise counts down 10 seconds and leaves; never leaves at once; a non-terminal stdin leaves at once, as does a task that failed before any build. The scrollback then gets the task's output, Bazel's errors, each failure with its log's path, and the raw log's path. In the macOS Terminal, the links tip shows after it when the scrollback has written-out file links.

Inspirations

  • Claude Code: the transcript's less-style keys without PgUp/PgDn/Home/End, the jump-to-bottom count of new lines, and a mouse the screen takes: its own selection, copied on release, and links opened on a click.
  • Turborepo and Nx: a list of tasks beside a log view of the chosen one (here, failures and actions). From Nx, auto-exit after a successful run with a countdown.
  • less and vim: u/d, Ctrl+U/D as half a page, / with n/N, and &-style filtering (Tab in the bar).
  • lazygit and k9s: a contextual keys row and a ? overlay; lazygit's zoom of one pane.
  • fzf and ripgrep: smart case.
  • IDE find bars (VS Code, JetBrains): regex, match-case and whole-word toggles, a live match count, and Esc going back.
  • Buck2's superconsole and cargo-nextest: running actions by elapsed time, so a stuck one stands out, and the cache-hit ratio.

What building it turned up

  • A wrapper script swallowed build.interrupt() and build.cancellation.cancel(), and so did plain bazelisk: both signalled the spawned pid alone. fix(bazel): interrupt the real Bazel client behind bazelisk or a wrapper #1695 fixed that on main: a Bazel child's signals now go to its whole process tree. screen.interrupt() still signals the CLI's own group, as Ctrl+C does, since it cancels the run, not only the build.
  • Worked around here: macOS poll() doesn't support /dev/tty, so the terminal uses select(). feat(bazel): process Bazel's console through stages, on by default #1197 handles the console side: Bazel lists running actions only on a terminal, it erases its progress area one row at a time, and the raw log is the only full copy when nothing is shown.
  • Open:
    • Frames run on the task's thread: from the build/test handles' event loop and inside wait(). A task that drains a build's events itself without calling run_output_hooks() (delivery, for example) shows nothing until its wait(), and work that blocks the thread after the build (exec log, BES sinks) leaves the last frame up. A host-side render loop would fix both.
    • Prompts that read stdin (GoDeps ask) compete with the screen for keys.
    • Ctrl+Z leaves the alternate screen up.
    • len() counts code points, not columns.
    • Bazel's PTY keeps its spawn-time size.
    • The task's reported time includes the time spent on the finished screen, because post_task hooks run before the task is timed.
    • Frame hooks ask the BES iterator for every event kind, as any build_event hook does.
  • A failing frame hook gives the screen back at once. Its error is raised by wait().
  • Lines a feature gets are drawable. output_feed() and screen.output() lines have escapes stripped once the line has ended (so one split across reads is whole), a carriage return's redraw resolved as a terminal shows it, and every other control character but a tab dropped. Each line's OSC 8 links come beside it as character spans (output_feed()["links"], screen.output(with_links = True)): the console links a hidden build's output too, as it does a terminal's, with no URL written out beside a link, so the screen opens the same links without finding them again.
  • Not from a background job. take() refuses, and std.term.size() is None, while the CLI is not the terminal's foreground job, where changing the terminal's modes would stop it (SIGTTOU); the example then shows Bazel's console as usual.
  • The screen takes the mouse, and selects and opens links itself, as Claude Code does, so it works the same in every terminal, the macOS Terminal included, which shows no OSC 8 links. A drag selects (within the console pane's text when it starts there), drawn reversed, and its release copies it by OSC 52 and, on this machine, pbcopy, wl-copy, xclip or xsel. A click on a link opens it with open / xdg-open, a file in the editor --console:file-hyperlink-format names, at its line. Only http(s) and those editors' schemes are opened, since any tool's output can write a link; any other (file://), and any in an SSH session, is copied instead. The console's links are drawn underlined, and as OSC 8 for a terminal given the mouse back (m), where screen.wheel_keys(True) sends its wheel as ↑/↓ (alternate scroll, ?1007); release() puts that mode back as the terminal had it (asked with DECRQM). screen.pasting says a paste is still arriving in pieces.
  • A failure's log outlives Bazel's file. Bazel replaces an action's bazel-out/_tmp/actions/ stdout and stderr as the build goes on, so a log the screen showed could be gone when looked at again. Failed actions' logs are now kept in the task history by default (BazelTrait.keep_action_logs = "failed", hard links), and the keep sink publishes each action's kept paths as it links them (build.kept_action_log(primary_output)), which the log view reads first. A log gone from both says so, and suggests --history:action-logs=failed when keeping is off. --history:action-logs and --history:test-logs gain auto, the default (config's choice), so none now turns keeping off. Since keeping reads the build event stream, every aspect build and aspect test now has one (the Artifact Upload feature already subscribed on most runs).
  • A DX pass (CLI, Bazel, and the coding agents' terminals, Claude Code's above all) turned up, and this fixes:
    • Off under a coding agent. An agent's pty has nobody to press the keys the finished screen waits for, so it hung: the screen stays off there even when enabled, and with TERM dumb or unset or under 40x12, saying why on stderr.
    • Bazel's lines read as Bazel writes them: indented, --show_timestamps'd (which also hid the bar and the cache tally), TIMEOUT: and a test summary's TIMEOUT; a tool's lines under an ERROR: take its kind, so e shows a compiler's diagnostic. Each line is classified once.
    • The scrollback keeps Bazel's ending: the first error blocks with their diagnostics, each failure with the history's copy of its log (not Bazel's transient file), at most 20, Bazel's closing block as it wrote it (test summary, Elapsed time, Build completed; its first 5 and last 40 lines, Executed N out of M tests among them), and aspect history show <id>.
    • Long lines wrap, in the console and a log, scrolling still by line; each row keeps its line's colour and links, and a copy joins them again. w cuts them.
    • A successful action's output folds to its INFO: From and "… +N lines", as Claude Code folds a tool's output; Ctrl+O shows them all.
    • Small terminals keep whole counts, the title, a running action's age (its description cut in the middle) and the keys row; under 16 rows the links row goes, then the panes shrink.
    • The console keeps 20,000 lines, counts the rest in its title, keeps errors and warnings past that for e, and its "N new" count names the errors among them.
    • The finished screen shows Bazel's critical path and the slowest actions seen running; q, Enter or Esc during its countdown leave at once.
    • Searches land with lines wrapped (a match centred in rows) and from a folded view (the bar's origin kept in lines); the 20,000-line cap trims a tenth at once, so refolding is rare.
    • Flaky tests are a yellow ~ that says it passed on a later attempt, counted apart, listed in the scrollback under their own Flaky: and no longer stopping the success countdown; a timeout says after how long.
    • No frame written twice, each one a synchronized update (?2026, in screen.write()), and the idle finished screen reads a key a second; Ctrl+L redraws.
    • In the search bar Ctrl+W (and Alt+Backspace, now a key of std.term's) deletes a word, and whole words are Ctrl+B (or Alt+W).
  • Follow-ups from the DX pass: a retry keeps the console with a divider rather than starting it afresh; a ZWJ emoji's width; the header's time from Bazel's own; tests at a glance (cached, flaky and timeouts in the Tests row); a phase and a stall indicator; the remote cache and executor's state; y and p copying a repro and a log's path; a click choosing a failure row, and the wheel scrolling the pane under the pointer; failed targets told from those a failed dependency blocked (aspect's summary and the JSON alike); an inline mode (the dashboard in the bottom rows, the rest in the terminal's own scrollback).
  • Follow-ups: PTY integration tests for every path that gives the terminal back; a suspend/resume primitive (Ctrl+Z, and pausing for a prompt); q signals the CLI's whole process group, which a wrapping script or pipeline shares.

Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes (the plugins README; std.term, std.re and std.fs.try_read_tail are documented in their Rust docstrings; a docsite page follows)

  • Breaking change (forces users to change their own code or config): no (--history:action-logs=none and --history:test-logs=none now keep none rather than leaving config's choice, which auto now does)

  • Suggested release notes appear below: yes

  • AXL: ctx.std.term.take() gives a feature the terminal as a full screen: the alternate screen, keys read without echo (pastes, the wheel, Shift+arrows), its size, and frames drawn in one write. The process's stdout and stderr are captured while it is held and replayed when it is given back, which happens on every way out: the run's return, a forced exit, a panic, a failing hook, a crash.

  • AXL: ctx.std.re compiles linear-time regular expressions (Rust regex syntax) with case, whole-word, filter, replace and highlight.

  • AXL: ctx.std.fs.try_read_tail(path, max_bytes) reads a file's last bytes from a line's start.

  • AXL: screen.mouse(True) reports the left button's presses, drags and releases as keys (mouse-press:<col>:<row> …), and build.output_feed() and screen.output(with_links = True) give each line's links as character spans, so a full-screen feature can select text and open the console's links itself.

  • The console names each failed action's kept log: an INFO: <label> <mnemonic> stderr: <path> line as the history keeps it (written where Bazel is not drawing its progress area), and full stderr: <path> under the error in the end-of-build recap.

  • Each task's history folder gets output.log: the task's whole output as it was shown, colour stripped and secrets redacted.

  • The dashboard: a click on a file's path shows the file in place (a peek of the whole file, syntax-highlighted, the line marked), o opens the log or file in your editor and O picks another (with how to keep it in config.axl); a target not built because a dependency failed reads blocked by :broken and opens what blocks it; links light up under the pointer; a double click selects and copies a word; Page Up/Down and Option/Alt+arrows scroll.

  • AXL: ctx.std.syntax.highlight, ctx.std.fs.try_read_lines, and ctx.std.io.editor(), editors(), editor_url() and editor_target().

  • The dashboard's main pane has tabs: the console, the failures, build metrics (cache hits by the execution log), the invocation's details and tips.

  • The dashboard's colours come from the theme (feat(console)!: themes for every colour the CLI draws #1730): borders, titles, the keys row, tabs, hover, selection, search matches (search.current on the current row), the marker, scrollbar, progress and the status_bar top bar. Bazel's lines colour only their label, by the theme's bazel.* roles, or as Bazel does with "bazel": "tool". Taking the screen asks the terminal its background (OSC 11), so the background-painted roles get their fixed colours where COLORFGBG is unset (Terminal.app, VS Code).

  • --dashboard:actions=all asks with publish_all_actions, so the extra action events reach the task, not its BES sinks (fix(bes): keep the actions the CLI asks Bazel for out of downstream sinks #1729).

  • The dashboard ships with the CLI as the Dashboard feature, off by default: --dashboard:enabled=true.

  • The dashboard's console shows the task's output from its start, and on exit the scrollback gets that console as shown, then the failures with their kept logs, the counts and aspect history show <id>.

  • cargo build compiles the AXL interpreter optimized, so a debug build's full screen keeps up (a frame 71ms to 1ms).

  • Failed actions' stdout and stderr are kept in the task history by default (--history:action-logs=none turns it off). --history:action-logs and --history:test-logs default to auto, config's choice; none now means keep none.

  • AXL: build.kept_action_log(primary_output) gives the logs the history has kept so far of one action.

  • screen.write() sends each frame as one synchronized update (?2026), which terminals that know it draw whole.

  • The dashboard stays off under a coding agent, wraps long lines, folds a successful action's output (Ctrl+O shows it), and leaves Bazel's own ending in the scrollback.

  • The dashboard takes the mouse: the terminal no longer scrolls past it, a drag selects and copies, and a click opens a URL or a file (in your editor).

Test plan

  • The integration tests keep every CLI they spawn out of the developer's task history and cache: the first aspect_cli() in a test process points ASPECT_HISTORY_DIR and ASPECT_CLI_CACHE at temp folders of the test binary's own (one per binary, reused run to run), which a child that clears its environment gets back through base_env().

  • New test cases added:

    • key parsing: Shift+arrows, SS3 and F-keys, tmux and rxvt Home/End, control keys, Alt as Meta;
    • std.re: case, whole words, an alternation kept inside the word boundaries, and an invalid pattern's message;
    • key reading: a bracketed paste as one key, a paste longer than a read in pieces (its end marker or a UTF-8 character split across reads held back), a UTF-8 character split across reads, a stray continuation byte, Esc with a key as Alt;
    • the plugin's search bar: jumping (the newest match above the view, n/N to either end, none found, Esc going back to where the bar opened: following, scrolled up, held on a match, from the top page after Shift+K, across a retry), the current match kept on its line and in view as lines arrive until G, an empty query counting nothing, filtering with Tab, smart case (escapes, hex digits, flags and group names aside), toggles, a pattern still being typed, check agreeing with compile's options, Esc+key replayed as two keys, a paste on one line without control characters (ignored with the bar closed), highlighting that never lights the padding, and the bar's width;
    • mouse reports: SGR and legacy wheel events, and the left button's press, drag and release at their cell, named, with modifiers; other buttons skipped whole, and unfinished reports waited for;
    • a feed line's OSC 8 links kept as character spans of its text, across colour and a dropped control character;
    • the plugin's mouse: marks wrap cells around escapes and colour resets, a link found at its cells (after a tab, cut to the row), the console's links drawn so a click opens them (open), copied instead over SSH, and a drag reversed and copied (pbcopy, OSC 52 once) without the pane's border;
    • the ? overlay (full screen, scrolled by ↑↓ and the wheel, any other key closes it and does nothing else), Tab and z never leaving a hidden list focused, the cache row leaving the list a row on a short terminal, the countdown over an open bar, the keys row's width, the countdown row, z, m, u/d and the wheel, new lines counted while scrolled up, the cache tally, running actions' ages and order, and the actions list (a, its own choice, Enter and ]);
    • the finished screen's leave keys, with and without the bar open, and Esc closing the innermost thing open;
    • failures: records from failed actions and test attempts, a bytestream:// test log mapped into the output tree (last and earlier attempts, shards, unknown counts), the log view (escapes stripped, stderr and stdout divided, a cut log, a log not on the machine), Tab, Enter, ]/[ and the list's rows and width;
    • std.fs.try_read_tail: a whole file, a cut at a line's start, a missing file;
    • unfinished escape sequences;
    • the replay cap;
    • a redirect capturing and replaying, a child outliving the capture, and a busy child not holding up the restore;
    • per-source unended lines in the feed;
    • the remembered terminal state across a redirect;
    • the plugin's layout (every row within the width at 16–60 columns, links, crowded panes, scrolling) and its event counting;
    • the DX pass: refusing an agent, a dumb TERM and a tiny terminal; line kinds (indented, timestamped, timeouts, a diagnostic under its ERROR:); the 20,000-line cap and its count; the scrollback's report; small layouts; the countdown's keys; Ctrl+L; a search jump with lines wrapped and from a folded view; the cap's trim; the closing block's head and tail; flaky tests in the scrollback; Alt+Backspace and the leave sequence (term.rs); wrapping and a wrapped line's copy; flaky and timed-out rows; the critical path and slowest actions; folding; the search bar's keys; a synchronized frame (term.rs).
  • Golden tests: the visible frames of render for a running build, finished success and failure, the Failures tab with a log, the Tips tab, a narrow and a short terminal, and the keys overlay (aspect dev test-dashboard --update rewrites them); and the bytes a take and release, a screen held at exit, Ctrl+Z and fg, a failure and Ctrl+C under a screen write to a pty (UPDATE_GOLDEN=1 rewrites them).

  • take()/release() swap the process's own stdout and stderr, so pty tests (child_output_test) and the harness below cover them rather than unit tests running in parallel.

  • Manual testing: the command above in a terminal, under a 100x30 PTY harness:

    • running actions and the bar from [n / m];
    • e and q typed into the screen;
    • Ctrl+C;
    • one alternate-screen enter and leave, with the cursor shown again;
    • the scrollback after;
    • ?, the wheel, a search with n, z, and a with --dashboard:actions=all showing an action's log;
    • a passing build counting down and leaving, with the mouse given back.

    A redirected run with the flag on prints plain output.

  • Manual testing of the DX pass, under a pyte PTY harness against real Bazel: CLAUDECODE=1 refuses and the build finishes by itself; 40x10 refuses, 40x12 and 80x24 draw whole, a resize to 40x10 keeps the console and the keys row; a failing demo's scrollback ends with Bazel's own block and the history's copy of the log; a 12,000-line flood folds, g reaches the top, a long line wraps to its end, and e shows the diagnostic.

🤖 Generated with Claude Code

@gregmagolan
gregmagolan force-pushed the console-fullscreen-poc branch 9 times, most recently from 45f7745 to 3e019ce Compare November 20, 2026 22:33
@gregmagolan
gregmagolan force-pushed the console-fullscreen-poc branch 12 times, most recently from 25b9a8f to a500f18 Compare November 21, 2026 01:41
@gregmagolan
gregmagolan force-pushed the console-fullscreen-poc branch 6 times, most recently from 058549f to a871169 Compare November 21, 2026 04:41
gregmagolan and others added 30 commits November 25, 2026 23:26
- A dump's mark notes how much of the task's and the console's unended
  lines the terminal already shows (out::mark_dump). The dump leaves that
  start out, whether it is still pending or since written as the start of
  its line, whose start is kept apart in output.ansi for it. It then goes
  on from the line the terminal is on, with no new line first.
  A line begun before a take and ended under the screen shows once and
  whole, and a question answered at a prompt shows once; a Ctrl+Z cycle no
  longer dumps the same unended tail again. The task's and the console's
  unended lines are two lines in a dump, not one.
- The stdout console waits for stderr's forwarder (a Gate) before it holds
  stdout's target, and holds it across a flush too.
- A dump says it is written as it takes the mark, under the mark's lock,
  so a release racing a suspend's dump doesn't dump again; a failed resume
  keeps the screen given back without a fresh mark.
- ASPECT_TEST_DUMP_DELAY_MS is capped at 5s. Docstrings follow.
- Tests for the line begun before the take and the answered question,
  both failing without the mark's note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shown-prefix skip rendered a line's start and the rest apart, which
broke the files themselves: a secret cut by a mark went unredacted, a
carriage return or an erase across the cut was lost, a character split by
it became two, and the dump glued what followed onto the terminal's line.
It is gone (Stream::shown, the kept ranges, the continuation).

Files are rendered from whole lines exactly as with no screen. A dump's
mark notes only whether the task or the console had an unended line, the
one the terminal is in the middle of; the dump then has that line whole
and redraws its row from the start (CR, erase line) instead of a new line.
std's buffered stdout is flushed under the dump's turn where it shares the
terminal, so a line begun there shows once and nothing of it after the
end. The task's and the console's unended lines are two lines in a dump.

Also: a take sets its dump mark inside the descriptor switch, as resume
does; the stdout console's gate is skipped for hidden writes; repeated
dump_output() calls give the same answer.

Tests: a secret split across Ctrl+Z, the older note on its own line, a
buffered stdout line begun before the take (each failing on 5b168bb),
and file-level tests that a mark changes nothing in the files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dump erased a forwarded child's unended line sharing the row (a
child's start is shown, not copied until its line ends, and is never
written again), because the redraw keyed on a flag from the mark.

axl_types::terminal now notes, per target, whether its current row holds
only the CLI's own output (its lines, the AXL streams, the build console,
keep_output): the CLI started the row and nothing else has written to it
since. A dump redraws the row only when that holds, the CLI had exactly
one unended line at the mark, and that line wasn't stdout's on a target
of its own. Any other row gets a plain newline: a start may show twice,
never be lost.

Also: the dump's stdout flush runs only with the target held. The take()
comment and dump_output's doc follow. The out.rs part tests are described
as whole-line rendering guards. The secret test asserts the CLI stopped
before fg. main_screen erases a whole row on ESC [ 2 K. A test for
childafter, childfirst, stdoutpiped (on the terminal and piped) and
latedump fails with the old rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dump that finds the terminal mid-line now always starts with a newline.
Redrawing the row with `\r\e[K` erased output the CLI cannot see the
owner of: a child given the CLI's own stderr, a child's stdout piped
through `| cat` to the same terminal, and it wrote escapes into a
`2>file`. The cost is that a line left unended when a screen is taken
shows its start again in the dump.

Drops the row-owner tracking (CLI_ROW, wrote_cli), the dump's partial
flag and mark_dump. The release and suspend dumps pass whether giving
the descriptors back held every target, so a dump after a timed-out
hand-off takes stderr's turn itself before flushing stdout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With stdout and stderr separate targets, a hand-off that gave up on
stdout's (a forwarder stalled on a pipe nobody reads) made the release
and suspend dumps take stderr's turn again, on the lock the same thread
held: a 2s wait before every such dump and Ctrl+Z.

every_turn_within now returns Turns, which says which targets it holds;
the dumps pass whether stderr's is held. The dump's flush of std's
buffered stdout waits for the terminal to take writes, so one stopped
with Ctrl+S never blocks it with every target held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…patches

Dashboard:
- `]` `[` `}` `{` with the Failures pick on a target without a log
  indexed past the logged records; the last of them stands in now.
- `}` `{` with the open log's target no longer listed (another list, a
  newer build's failures) took a modulo of zero; the chosen record's
  target is stepped instead.
- A build folded before any frame noted what it blocked kept `blocked`
  as None, and Metrics for it failed on len(None).
- Metrics' elapsed for a folded build is its own run, not the task's
  time so far.
- The Invocation tab hides the value of a secret-named setting inside
  a flag's value (`--define=API_TOKEN=x`, `--test_arg=--password=x`).

Lint:
- A relative fix patch path (a remote cache's lint output) is taken in
  the workspace: patch runs in the copies' directory and never found it.
  One that isn't there, or that patch can't read, is warned about.
- A patch making a file already there with other bytes keeps its hunk
  as a reject; BSD patch calls it applied already.

Runtime:
- The runtime's own FORCE_COLOR/CLICOLOR_FORCE removal on a reused
  command no longer reads as the task's, so a later spawn colours again.
- The terminal lock tests run one at a time: where stdout and stderr
  are one target they shared the mid-line flag and flaked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uble

Lint:
- A file a patch makes (old side /dev/null, no other header changing
  it) that is there already is made apart from it and compared by its
  bytes: the same count as applied, other bytes keep the file and the
  hunks as a reject. GNU patch never says "previously applied" for it,
  and the text compare was lossy for bytes that aren't UTF-8.
- patch exiting with trouble (2 or more, or a signal) applies nothing:
  files before the bad hunk were copied back. A patch path that is a
  directory says so.

Dashboard:
- } { step from the record shown, not the chosen one; one shown from a
  list it is no longer in opens its target's first record, unstepped.
- Metrics' elapsed for the running build is since it started.
- The Invocation tab hides a secret flag's value given in the next
  argument (`--test_arg=--password --test_arg=x`) or after a space, and
  takes pwd/passwd/cookie/session for secret names too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lint: one check, before anything is copied or patched, refuses the whole
patch with a warning naming the path and why: a path in more than one
header (a type change, two creations, a rename onto a made file), one
there that isn't a regular file, a parent that isn't a directory, a
symlink on the way (a dangling one let a creation write outside the
tree), or a patch past the 64 MiB read cap. A directory or a file where
a parent should be raised mid-way, after earlier files were rewritten.
Emptiness reads the file's size.

Dashboard: a secret flag's value in the next argument is hidden only
where that argument is the same flag again.

child_output_test reads CARGO_MANIFEST_DIR at run time: env! embedded
the build path, which Bazel's process wrapper refuses. history.axl's
docstring no longer calls every option off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apply_fix_patch's refusal follows every symlink on a named path and
refuses only one leading out of the workspace or to nothing: in-repo
symlinked directories applied before the up-front check and refused
every fix under them after it. Paths are compared with their symlinks
followed and their case folded (a case-only rename on APFS left an
empty file), and one with a `.` or empty component is refused (it
evaded the duplicate check and crashed making the copy's directory).
The size cap is checked before `seen` reads the patch, and its test now
bites: a first hunk patch would apply, then 64 MiB of line ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI on a loaded runner failed three child_output tests on their first
attempt and one crash_handler test:
- The two stalled-stdout tests gave the whole run 20s from test start,
  which the runner spent before the CLI printed anything. They now give
  a run 90s to get there; the times they assert stay measured from the
  take, the leave and the ticks.
- The Ctrl+Z test sent Ctrl+Z after 30s even if the screen never left;
  it now waits for the leave and asserts it. Its 1.5s bound stays under
  the 2s replay it guards against, so the target runs `exclusive`
  rather than beside the rest of //....
- crash_log_is_written_when_stderr_blocks killed the child once the log
  existed, but the handler opens the log before writing its marker: it
  now waits for the marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apply_fix_patch's refusal compared paths by spelling, case folded: it
missed one file under two Unicode normalizations on APFS and under two
hard-linked names (one hunk lost, or a file left empty), and refused two
real files that differ only in case on a case-sensitive disk. Each named
path is now keyed by the (dev, ino) of what it resolves to, or of its
deepest ancestor that is there plus the rest as named, so a lookup that
finds another spelling counts as that file.

Also refused: removing a file through a symlink naming it (the link
went, its target stayed), and a path in a directory it may not look in
(which raised). A file where a directory should be is named as such.

fs.Metadata gains `dev` and `ino` (None off Unix). The three
child_output tests that assert durations take one lock, so they never
run beside one another.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A case-sensitive checkout with the copies in a temp dir that folds case
had src/a.txt and src/A.txt as two files in the tree and one copy: both
hunks landed on it and the one result was written over both. The copies
are now checked by identity once made and again once patched; two named
paths that are two files in the tree and one there refuse the patch,
nothing copied back. Where the temp dir folds two new names into one,
that is now a clean refusal too, not a misleading reject.

Off Unix, where dev/ino are None, a path's spelling is its identity.
Refusals show characters past ASCII as \u escapes, so NFC and NFD
spellings read apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
console_test's "hang" on Linux CI is its timeout: some ninety runs of
the unoptimized CLI, each about a CPU-second evaluating the builtins,
took 274s on the passing retry against the medium size's 300s, and the
first attempt ran past it. HANG-DIAG's "stuck" process had one thread
running (the evaluation) and the main thread waiting on it: slow, not
held. The target is now large.

HANG-DIAG now prints each thread's CPU over one second, so a busy thread
reads apart from a stuck one, and every thread's stack from gdb or
eu-stack (each tried under `sudo -n` too, as Ubuntu lets no non-ancestor
attach), each bounded at 20s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Header names are read as patch opens them: to a tab, else to the first
whitespace. A name with whitespace and no tab after it (rules_lint's
`diff --label` gives that) opened another file than it named, and a
git-quoted name is unquoted by GNU patch only: both refuse the patch.
So do git headers the copy-back by bytes would not carry (a mode change,
a rename or copy, a binary patch) and modes other than a regular file's
(`120000`, a symlink).

A named path that another named path is with `.rej`, `.orig` or `.~N~`
after it is refused: patch's own output overwrote it. VERSION_CONTROL,
PATCH_VERSION_CONTROL and SIMPLE_BACKUP_SUFFIX are dropped from patch's
environment. Once patched, a named path in the copies that isn't a
regular file (a symlink GNU patch makes) or is gone unasked refuses the
patch, nothing copied back: the copy-back followed such a link.

Every path a warning or INFO line names is escaped: `\` doubled, control
characters and those past ASCII as `\u`/`\U` codes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tself

Lint: a git header's refusal names its keyword alone (it printed the
rest of the line, an escape sequence and all), and the path component a
file stands in is escaped. patch runs with LC_ALL=C and no LANGUAGE, as
_ignored_rejects reads its English. apply_fix_patch takes `say`, what
prints its warnings, so a test checks them. A dead `Binary files `
entry is gone from _GIT_HEADERS.

HANG-DIAG: a stack tool's stdout is drained as it comes (a report over
64 KiB blocked it until the kill, and read as "could not attach"),
stderr dropped; under sudo it runs within `timeout -s KILL`, as a kill
of sudo left a root gdb attached, and only where `timeout` is there.
Stacks are printed for the first two processes, 40s at most each, and
child_output_test is large, so the diagnosis prints before its timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From driving the Dashboard against real Bazel 9 builds of
examples/dashboard:
- A blocked top-level target counts as blocked, not failed, in
  Results, Metrics and the summary (target_counts); Metrics lists the
  failed actions and attempts on a row of their own.
- A test whose summary is Aborted (it failed to build) counts as
  failed, as Bazel counts it; an interrupt is no verdict.
- An attempt Bazel posts twice is one Failures row, the one with its
  log, and a failed TestRunner action folds into its test's attempts.
- Metrics' spawns say "after the build" until the execution log is
  read, then "0 run" for a log with none; a cached build's slowest pane
  says nothing ran. The follow hint names J, the key that follows; the
  Tips tab's keys row shows only its own keys.
- examples/dashboard/flaky.sh touches TEST_SHARD_STATUS_FILE, so its
  shards run on Bazel 9.

Tests: exec_log_event_test, feature_shorthand_test,
axl_load_failure_test and feature_color_test are large, each within
reach of medium's 300s on a loaded CI runner. HANG-DIAG spends its stack
budget on aspect-cli processes alone, counts only captures that worked,
and tries no tool again once every one has failed to attach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From real Bazel 9 runs:
- A test summary Aborted with no reason is failed only where one of its
  attempts failed (it failed to build); else Bazel skipped it (a build
  without --keep_going stopped first), counted as skipped in Results
  and Metrics. The last commit counted every one failed.
- A target is blocked only by a root cause that failed in this build: a
  missing source file (an unconfigured root) is its own failure.
- "nothing ran" shows only for a successful build its BuildMetrics say
  ran nothing; Metrics keeps no Slowest mid-build.
- A build folded at its end keeps that its execution log was read
  (end_build), rather than saying "after the build" forever.
- A failed TestRunner action folds into the attempt its output names,
  else stays; the Flaky group tells shards apart; the Tips keys row says
  undo where every tip shown is silenced.

HANG-DIAG reserves a stack capture atomically and gives it back unless it
worked, and gives up on the tools only where they failed to attach to a
live process, not for time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From real Bazel 9.3.3 runs (shapes in the tests):
- "nothing ran" leaves out the workspace status action, which Bazel
  runs on every build: a fully cached rebuild reports one executed.
- A TestRunner action is the attempt after the last whose result came
  (Bazel sends an attempt's action before its result), its run and shard
  from the one folder after testlogs/<package>/<name>/ alone: a test
  named shard_9_x, a package folder run_2, or a folder naming both
  (shard_1_of_2_run_2_of_2) no longer misparse. It is dropped once that
  attempt's result comes with a log; where it never does (a shard that
  failed to build, an attempt cut off), its row is that attempt's.
- An Aborted test summary is failed only beside a FAILED_TO_BUILD
  result: a flaky test whose later attempt was cut off is skipped, as
  Bazel counts it. A test target that failed to build or was blocked
  counts failed in the Tests row, once.
- Blocked is decided from the build's failures as they end up, so a
  dependent Bazel reports before its root (one failed in analysis, an
  Aborted target_configured) is blocked.
- A folded build is not building: picked with < while the next runs, it
  keeps its Slowest. Skipped tests show in the scrollback's summary and
  the narrow header; the Tips keys row names what s does to the chosen
  tip.

HANG-DIAG treats a zombie as gone and gives all stack capture 60s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A test target that failed to build or was blocked counts as a failed
  test only under `test` or `coverage` (from BuildStarted's command):
  `aspect build` ran no test.
- The finished pane's "nothing ran" row was nine cells short: its colour
  came inside the text `fit` pads by length. It is plain now, coloured by
  the box, as a running action's age is; the "+N earlier" row too.
- A target blocked by a dependency it was not asked for, which failed
  analysis (an Aborted configured_label), is blocked, not failed.
- A TestRunner action's attempt is keyed by its configuration too, and
  a retried attempt clears what a new build clears (root causes and the
  blocked cache), through one helper.

HANG-DIAG's 60s stack budget is time spent capturing, not a deadline
from the first capture: a slow CLI captured early leaves it for a hang.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… own

A root cause not asked for that failed analysis (an Aborted
configured_label: a broken rule, a missing package) read "✗0": only
its dependent was listed, blocked, and Enter on it said the root had no
log. It now counts as a failed target, once per label though Bazel posts
it per configuration, and is a ✗ row whose log is Bazel's error (the
Aborted description).

count_event and note_event take `aborted` (the payload's type by
default), so a test feeds a real-shaped Aborted configured_label; the
count_event docstring covers BuildStarted's gating and failed_roots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bazel 9 makes a requested target that fails analysis its own root
cause: an Aborted configured_label for its label, then its Aborted
target_configured with that as its child. Both counted it failed, so
Results, Metrics and the summary said 2 failed beside Failures' one.
The root is now counted through count_aborted, which counts a label
once whichever of the two comes first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tool's line written as `ESC[32mINFO:ESC[0m two` (the colon inside the
colour, the space after) matched Bazel's own end-of-build status line,
which curses draws in its progress area. Taken for drawn, it and the
line after it were erased under a terminal: lost from the Dashboard's
console and the plain console alike. Inside an action's output, or
streamed test output, such a line is the tool's, for every severity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
interrupt.rs and task_exit.rs spawn the CLI keeping the whole
environment, so their fixture tasks (sleeper, waiting, stubborn,
grouped, watching, owner, prompt, shell, ignores, refuse) were recorded
in the developer's own task history, some 2,200 entries. The first
aspect_cli() call in a test process now points ASPECT_HISTORY_DIR and
ASPECT_CLI_CACHE at temp folders of its own, which every CLI it spawns
inherits whatever its command keeps; base_env() carries them too, and a
test that names its own still wins. A test spawns the CLI keeping the
environment and finds the run in the test process's history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no tips, an inactive Tips tab and the console's state ("following",
"12 lines up · J to follow") were the same muted gray side by side, so
the state read as another tab. It now sits at the right end of the tab
border, a dash apart from the tabs, in the accent colour no tab has; it
is cut, then left out, rather than the tabs collapse for it. Seven
golden frames changed in that border line alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
w, e, z, m, p, a and Ctrl+O changed the screen with nothing said. Each
now has the keys row name the state it left and the key that undoes it
for two seconds ("long lines cut · w wraps them", "errors only · e
every line", "mouse off: the terminal selects text · m takes it back"),
from a `said` beside its overlay text in KEYS. What the keys row says of
its own first (cancelling, finishing, the countdown) still wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… does

The Results pane's "Cached 4% of 1452 actions" read against the
header's "3,830 of 8,563 actions done" as a contradiction. The header is
Bazel's own progress count, every action in the build graph (one its
local action cache satisfies, and its internal ones, count as done
without running); the Results figure counts the execution log's spawns
so far (what ran, or a remote or disk cache served). It now says
spawns ("Cached 4% of 1,452 spawns"), and every count the Dashboard
prints has thousands separators (`_counts`).

As BuildBuddy's theme colours the seconds in Bazel's progress area, a
running action's time alone is drawn by its age (muted, then warning
once slow, error once stuck, `aged_time`), the rest of its row plain;
and the header's time is strong, as that theme makes Bazel's elapsed
time bold. Roles every theme defines, so NO_COLOR and mono follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tab widths

- c27cccd let Bazel's own curses status rows through after
  --test_output=streamed (`streamed` never resets): five bare `INFO:`
  rows in the console. The status guard is the action's output alone;
  streamed output takes a status row only with nothing after its label
  or one of Bazel's status phrases.
- Every note goes through say_note, so a mouse note after an expired
  toggle note shows; notes are timed by the screen's own clock, so one
  expires on the finished screen, whose header time stays.
- z and p say what is so (console zoomed or unzoomed; no build panes
  before a build); the tab border's state is bold too, apart where
  colour is not shown.
- A tool's `INFO:` coloured as Bazel colours a label (colon inside the
  colour) stays in its action's Ctrl+O fold.
- At 49 columns the shown tab was cut to `onsole`: the collapse check
  was a cell looser than the room the tab gets.
- Test history and cache folders are one per test binary, reused, not
  one per process left behind. The waiting-line doc comment is back on
  its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- After --test_output=streamed a status-shaped row was Bazel's when its
  text began with one of Bazel's closing phrases, so a test's own
  colon-inside "Build completed…" line was drawn and trimmed. Bazel's
  own colon-inside status row is always bare; only that counts now.
- The header's time was `strong` inside a bar already bold and in
  reverse video, so it showed no different. It now leaves the bar's
  reverse video, in `heading`: apart in every theme, mono included.
- The slowest pane's minutes (`1m05s`, as `elapsed` writes them) got no
  colour: one word parser reads Bazel's times and `elapsed`'s.
- Beside the caller's own binary or JSON execution log, a hook that only
  reads entries (the Dashboard's) no longer adds the compact log, which
  made Bazel refuse the build; its handle ends with no entries, and
  telemetry adds none either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the caller's own --execution_log_binary_file or
--execution_log_json_file, Bazel writes no compact log for the
Dashboard to read, so Metrics said "0 run: the execution log has none".
It now says the build writes its own execution log, naming the flag,
read from the build's options (an rc file's too); Results shows no
cache row, having no spawns to count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rator is told

An empty `--execution_log_*_file=` value now counts as no format in both
the runtime and the dashboard, which also reads the last occurrence so a
command-line value overrides the rc. Beside a caller's own binary or JSON
log the iterators are released; the exec-log hook's is marked as such, and
a task's own iterator warns once that it gets no entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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