Repository navigation
Warnings go to a log you open with Show log, and the status bar counts the ones you haven't seen #473
Copy link
Copy link
Closed
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Dev
Description
Context
Today, when something fails behind the scenes, TuiCode says nothing. A settings file that doesn't parse quietly falls back to defaults, an invalid rebind is skipped, and the file watcher can stop. Each is logged to nowhere, or not logged at all. This task gives those warnings a log file, a way to open it from inside the editor, and a ⚠ n count in the status bar until you've looked. Pitch: #92.
Depends on #442 (Terminal.Gui 2.5), which rewrites how DefaultSettingsService loads settings, the code this task adds warnings to.
Acceptance criteria
- Put a trailing comma in
~/.tui/TuiCode.settings.jsonand start TuiCode: the status bar's message readsTuiCode.settings.json has an error, so defaults are in use. sl shows the log, and⚠ 1shows on the status bar's right side, beforeLn, Col, in the theme's warning colour. - The message goes when the next one replaces it;
⚠ 1stays. - Show log (
sl) is in the command palette and in the Help menu, below Show diagnostics. It has no default key. -
slopens~/.tui/logs/TuiCode.logas an ordinary editor tab, which can be searched and copied from. If it's already open,slswitches to it. - The log names the file and what was wrong, with the line and column from the parse error, and says defaults are in use for the whole file.
- Opening the log clears
⚠. A new warning brings it back with a new count. - Clicking
⚠ 1, icon or count, does the same assl. - A broken keybindings file, a broken grammar associations file, an invalid keybinding override, a user grammar in
~/.tui/grammarsthat fails to load, and a workspace state file that can't be read or written each add a warning naming the file and the reason, and count towards⚠. - A folder whose changes can't be watched adds a warning saying so.
- While the log is open, new warnings appear in it (the disk-change notices keep it current).
- Each session starts a fresh log. The previous session's is kept as
TuiCode.1.log; older ones are gone. - A crash writes its exception and stack trace to the log, and after the terminal is restored TuiCode prints
TuiCode crashed. Details: ~/.tui/logs/TuiCode.log. - Information and Debug messages aren't written to the log.
-
AGENTS.md's logging line states the convention: Warning and above go to the log and count towards⚠, nothing else is written, and the status bar isn't used for diagnostics except the one settings message.
Tests
- The log provider: Warning and above written in the line format (time, level, message, exception message, indented stack trace); Information and Debug dropped; rotation to
TuiCode.1.logand deleting older ones. - The unseen-warning count: rises per warning, clears when the log opens, comes back on the next one.
- Each silent failure above logs a warning naming the file (settings, keybindings, grammar associations with line/column; user grammar; workspace state read and write).
- The startup message appears only for
TuiCode.settings.jsonnot parsing. - Clicking the status item opens or switches to the log tab.
- The crash path: an unhandled exception is logged and the path printed after shutdown.
Out of scope
- A Settings option for the log level or location.
- An Output panel, log channels, or filtering by level.
- Pointing at the error inside the settings file (squiggles).
- Sending logs or crash reports anywhere.
- New log calls beyond the failures listed above, or any Information/Debug logging.
- Hover highlights or tooltips on the status bar.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Dev
Activity
a-team-app commentedon Oct 8, 2026
Blocked by #442: Terminal.Gui 2.5 rewrites how settings load, which is where these warnings go
a-team-app commentedon Oct 9, 2026
Draft PR #493 is up.