feat(build): the build log shows info and above, with a level picker and a search, and follows new lines at the bottom #30

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:feat/build-log-levels into main 2026-11-13 11:06:23 +00:00
Owner

Why

The build's details showed every line the game prints. On AMD and other cards, a dozen expected vk: program … not translated: a network left out on this card lines filled the view and read like errors. Longshot now tags its detail lines with a level (Longshot #177). The details show Info and above by default, with a level picker and a search, and they follow new lines while scrolled to the bottom.

What changed

  • Core (Core/LogLevels.cs):
    • LogLevels.Of reads a line's level from the game's tag: [hos host] [trace] …, and likewise [debug], [warn] and [error]. A build's own error: line is an error. A line with no tag is info, so a game from before #177 shows as it always did.
    • BuildLog stores each line's level once, as the line is added. Tail(level, search, limit) gives the details' filtered last lines, and Last(n) gives the bug report's lines at every level.
  • Build step (App/ViewModels/BuildStepViewModel.cs, App/Views/BuildStepView.axaml):
    • Above the log: a level picker (Errors, Warnings, Info, Debug, Trace; default Info) and a Search the log box (any case).
    • Copy for a bug report keeps every level.
    • The problem page's 6-line preview shows info and above.
    • A stopped build's message quotes the last stderr line at info or above, not a debug or trace line.
  • Follow (BuildStepView in App/Views/Views.cs):
    • While at the bottom, new lines scroll the view there again.
    • Scrolling up stops following, even in the same layout pass as a new line. The text then stays still, even past the 2000 lines shown, because Following holds LogText back.
    • Scrolling back down, opening the details, or changing the level or search goes back to the bottom and follows again.
    • The view drops its subscription to a previous build's view model when the page is reused.
  • Checks (tests/launcher_core/LogChecks.cs): every tag, untagged and unknown tags, a [trace] later in the line, the tail at each level, search (any case, trimmed, blank), the tail's limit, and the report's lines.

Testing

Tested:

  • python -I tests/test_launcher_core.py: 629 checks passed. python -I tests/test_release.py: OK. Both on Linux (CachyOS, .NET 10).
  • A fake build in a headless window: the real MainWindow on the build step, with make_game's @@ lines and game lines in #177's format replayed through BuildStepViewModel.Replay (no make_game, no game). It drew the screenshots below and checked the following behaviour. All six passed:
    • after 80 new lines, at the bottom
    • scrolled up, 20 more: the offset stays
    • back at the bottom, 20 more: at the bottom
    • scrolled up in the same layout pass as a new line: stops following
    • 2,500 more lines while scrolled up: the text and the offset don't move
    • the level changed: following again, at the bottom, newest line shown

Not tested: a real build with the launcher's window on screen (deliberately not run, to keep this PC's load down). Windows: the code is platform-neutral Avalonia, but it hasn't been run there.

Needs other testers:

  • Windows: Show details during a build. Expect the picker and search to filter, and scrolling up while lines arrive to hold still.

Screenshots

The build step's details on a fake build at feat/build-log-levels @ eee27043 (on main @ 3cae845d the details show every line, with no picker or search).

Info (default): the 18 trace and 2 debug lines hidden

Info

Trace: every line

Trace

Search "network", at Trace

Search

Risk and rollback

The details hide debug and trace lines by default. Someone reading a build for a problem picks Trace, or uses Copy, which keeps every level. Reverting the commit is enough.

🤖 Generated with Claude Code

## Why The build's details showed every line the game prints. On AMD and other cards, a dozen expected `vk: program … not translated: a network left out on this card` lines filled the view and read like errors. Longshot now tags its detail lines with a level ([Longshot #177](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/177)). The details show Info and above by default, with a level picker and a search, and they follow new lines while scrolled to the bottom. ## What changed - **Core** (`Core/LogLevels.cs`): - `LogLevels.Of` reads a line's level from the game's tag: `[hos host] [trace] …`, and likewise `[debug]`, `[warn]` and `[error]`. A build's own `error: ` line is an error. A line with no tag is info, so a game from before #177 shows as it always did. - `BuildLog` stores each line's level once, as the line is added. `Tail(level, search, limit)` gives the details' filtered last lines, and `Last(n)` gives the bug report's lines at every level. - **Build step** (`App/ViewModels/BuildStepViewModel.cs`, `App/Views/BuildStepView.axaml`): - Above the log: a level picker (Errors, Warnings, Info, Debug, Trace; default Info) and a *Search the log* box (any case). - **Copy** for a bug report keeps every level. - The problem page's 6-line preview shows info and above. - A stopped build's message quotes the last stderr line at info or above, not a debug or trace line. - **Follow** (`BuildStepView` in `App/Views/Views.cs`): - While at the bottom, new lines scroll the view there again. - Scrolling up stops following, even in the same layout pass as a new line. The text then stays still, even past the 2000 lines shown, because `Following` holds `LogText` back. - Scrolling back down, opening the details, or changing the level or search goes back to the bottom and follows again. - The view drops its subscription to a previous build's view model when the page is reused. - **Checks** (`tests/launcher_core/LogChecks.cs`): every tag, untagged and unknown tags, a `[trace]` later in the line, the tail at each level, search (any case, trimmed, blank), the tail's limit, and the report's lines. ## Testing **Tested:** - `python -I tests/test_launcher_core.py`: 629 checks passed. `python -I tests/test_release.py`: OK. Both on Linux (CachyOS, .NET 10). - A **fake build** in a headless window: the real `MainWindow` on the build step, with make_game's `@@` lines and game lines in #177's format replayed through `BuildStepViewModel.Replay` (no make_game, no game). It drew the screenshots below and checked the following behaviour. All six passed: - after 80 new lines, at the bottom - scrolled up, 20 more: the offset stays - back at the bottom, 20 more: at the bottom - scrolled up in the same layout pass as a new line: stops following - 2,500 more lines while scrolled up: the text and the offset don't move - the level changed: following again, at the bottom, newest line shown **Not tested:** a real build with the launcher's window on screen (deliberately not run, to keep this PC's load down). Windows: the code is platform-neutral Avalonia, but it hasn't been run there. **Needs other testers:** - Windows: Show details during a build. Expect the picker and search to filter, and scrolling up while lines arrive to hold still. ## Screenshots The build step's details on a fake build at feat/build-log-levels @ eee27043 (on main @ 3cae845d the details show every line, with no picker or search). Info (default): the 18 trace and 2 debug lines hidden ![Info](https://git.magicbean.dev/attachments/e165eb3e-e4cd-45c6-8da7-b213645ad9f6) Trace: every line ![Trace](https://git.magicbean.dev/attachments/5ca5b114-b466-4509-b6c7-aa8e8182ea81) Search "network", at Trace ![Search](https://git.magicbean.dev/attachments/a559246c-ee11-4567-84af-e2202fb2cc0f) ## Risk and rollback The details hide debug and trace lines by default. Someone reading a build for a problem picks Trace, or uses Copy, which keeps every level. Reverting the commit is enough. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(build): the build log shows info and above, with a level picker and a search, and follows new lines at the bottom
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
eee27043cb
Longshot's game now tags its detail lines ("[hos host] [trace] ..."); the
details hid nothing, so a card's dozen left-out movie networks filled the view.
Core/LogLevels.cs reads each line's level once; the copy for a bug report keeps
every level. The view scrolls with new lines while it is at its bottom.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: feat(build): the build log shows info and above, with a level picker and a search, and follows new lines at the bottom to feat(build): the build log shows info and above, with a level picker and a search, and follows new lines at the bottom 2026-11-13 11:04:55 +00:00
HumanBean deleted branch feat/build-log-levels 2026-11-13 11:06:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!30
No description provided.