Skip to content

fix: a wide direct target breaks before its port - #57

Merged
jkosber merged 9 commits into
mainfrom
fix/task31-connect-port-wrap
Nov 23, 2026
Merged

jkosber merged 9 commits into
mainfrom
fix/task31-connect-port-wrap

Conversation

@jkosber

@jkosber jkosber commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Task 31, found in the 0.4.0 release check: in the details, a direct machine's connect value wider than its row was cut at the row's edge, which could split the port. studio@studio-box.example.com:2222 showed :222 then 2 at 80x24 and :22 then 22 at 60x20, where the first row reads as another port. The value now breaks before its port. C was never affected: it always used the whole port.

Commit What
test: a wide direct target breaks before its port tests/test_connect_wrap.py, failing: wrap_target's cases, and the drawn rows at 80x24, 60x20, 120x30 and 40x16, with an exported machine, across a resize and after a status check
fix: a wide direct target breaks before its port wrap_target and ConnectValue in app.py; wrap_url's loop moves into a shared _wrap_at, behavior unchanged
docs: the connect value's break rule and its Ghostty check Changelog, user guide, architecture and the validation log
docs: Task 31 to Done with its PR number The roadmap's Done row
test: and fix: after the review An IPv6 address breaks after a colon instead of before it, so a port-less IPv6 address shows no row like :7334; ConnectValue.get_content_height returns 0 at width 0; tests for the exact-width row and for a check that finds a wide address; one new property test's expectation corrected in its own commit
docs: the break after an IPv6 colon; clearer validation wording Guide, architecture and the validation entry

Acceptance

  • A direct target wider than its row breaks before the port's colon; when that is out of reach, after the @; else at the last place in the address that fits, before a . or - or after a : that no : follows (so no row of an IPv6 address starts with a colon, like a port); else at the row's edge. The port stays whole on any row that can hold it
  • The value's text (the content of #machine-connect) is still one line, so every existing test of it holds unchanged; targets that fit and alias values are drawn as before
  • The break follows a resize and the address a status check finds, and the row's height follows the drawn rows
  • No existing test changed

Checks

  • ruff check, ruff format --check, pytest (1493 passed: 1458 and the 35 new), uv build and check_package.py pass
  • Manual terminal check in Ghostty (recorded in docs/validation.md): 80x24, 60x20, 120x30 and an exported machine at 80x24

What remains untested: Windows Terminal (the change is to how one value is drawn, not to the terminal handoff, key handling or the key-install script); in a real terminal, a long user name, a host name longer than the row and an IPv6 address, which headless tests cover, the break after an IPv6 colon included; 40x16 in a real terminal.

Docs

  • User guide: the connect row's break rule
  • Changelog: the details entry under Unreleased says where a wide target breaks (the split never shipped, so there is no Fixed entry)
  • Roadmap row in Done
  • No private hosts, aliases, addresses, paths or credentials in code, fixtures or evidence

@jkosber
jkosber merged commit bbac593 into main Nov 23, 2026
2 checks passed
@jkosber
jkosber deleted the fix/task31-connect-port-wrap branch November 23, 2026 08:39
@jkosber jkosber mentioned this pull request Nov 23, 2026
12 of 13 tasks
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