One frozen Platform spec (REGULAR/PICOCALC), resolved once at boot
(--platform flag > MESHTERM_PLATFORM env > /proc/device-tree/model
auto-detect > REGULAR) and read via get_platform()/set_platform() -
never a stale `from platforms import PLATFORM`, which the module
docstring calls out. `meshterm platform` reports the resolution and
everything it looked at.
Wires the two correctness bindings that matter before any flavour
work lands: width_reclaim off on PicoCalc's exact-width console
(session._reclaim_last_column, env override still wins), and the
emoji-width calibration probe skipped outright when a platform never
draws emoji.
tests/test_gallery.py renders all 16 screens the interactive menu
opens against REGULAR (72x24) and PICOCALC (53x26 live floor, 53x40
lux case), asserting no line overflows its platform - 35 passing
cases, 13 xfailed as a real P6 worklist (contacts, map, walk,
livefeed, remote_cli, path_composer). Also caught and left alone: the
map screen's footer hint already overflowed the *existing* 72-col
standard before this seam existed, unrelated to picocalc - xfailed
rather than fixed as a drive-by. tests/test_platforms.py unit-tests
the module directly; conftest.py gained an autouse fixture resetting
the platform between tests.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The MESHTERM_FULL_WIDTH reclaim reported the terminal one column wider than
probed, to draw a final column some terminals under-report. With the emoji
width now aligned to the terminal, that extra column pushes the frame past the
real screen edge and tears the layout. Remove it: the size probe is used as-is
again (_WidthExtendedOutput, _RECLAIM_LAST_COLUMN, _resolve_output, and the
MESHTERM_FULL_WIDTH gate all gone), and the app renders to prompt_toolkit's
default output. Drops tests/test_session_width.py with the feature.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On some terminals prompt_toolkit's size probe reports the window one column
narrower than it really is, so the frame draws to columns-1 and the true
last column sits unused (selectable to the right of the border). Wrap the
real terminal output in _WidthExtendedOutput, which reports columns+1 from
get_size(); since the renderer and the frame compositor both key off that,
the final column now gets drawn.
Gated behind _RECLAIM_LAST_COLUMN (env MESHTERM_FULL_WIDTH=0 to disable) so
it can be turned off on a terminal whose probe is already correct — there
the extra column would fall off-screen and wrap — and eventually promoted
to a user setting. Test-supplied outputs are never wrapped, so headless
rendering keeps its exact size.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>