Skip to content

fix(linux): raise the control socket backlog and resolve palette Ctrl-J/K by layout - #54

Merged
melonamin merged 6 commits into
melonamin:linux-portfrom
n2tr2:linux-v036-fixes
Nov 2, 2026
Merged

melonamin merged 6 commits into
melonamin:linux-portfrom
n2tr2:linux-v036-fixes

Conversation

@n2tr2

@n2tr2 n2tr2 commented Nov 1, 2026 •

Copy link
Copy Markdown

Two small Linux ports of macOS v0.36 fixes. macOS is unchanged, and there are no agtermCore changes.

What changes

Area Before After
Control socket listen(fd, 8), so a burst of concurrent agtermctl clients could fail to connect listen(fd, SOMAXCONN), as macOS does
Palette and agtermctl pick Ctrl-J/K compared the raw keyval with Latin j/k, so they did nothing on a non-Latin layout resolved through the keymap's shared chord path, so semantic J and K navigate on any layout

Behaviour change: the old state-mask test accepted extra modifiers. Ctrl-Alt-J and Ctrl-Super-J no longer navigate, because the chord now needs exact modifiers.

x11-xkb-utils joins ci.yml and release-linux.yml, because scripts/test-linux-ui.sh now requires setxkbmap.

Testing

  • swift test for agterm-linux: 573 tests in 86 suites pass. swiftlint lint --strict reports 0 findings. Debug and Release builds complete.
  • New PaletteNavigationKeyTests (10 tests): US, Russian-only, Russian as second group, Dvorak, Colemak, nil context, plain j/k, exact modifiers, non-navigation chords, arrows and Escape.
  • New AT-SPI scenario palette-layout-navigation, under setxkbmap ru, joins the full suite. It sends J and K as keycodes 44 and 45, because xdotool key ctrl+j binds a spare keycode to Latin j and passes on the pre-fix code. It fails on the pre-fix code, in the palette and separately in the picker, and passes with the fix. palette-lifecycle and control-picker pass too.
  • The backlog change has no unit test, since the kernel backlog is not observable from one. A listen shim logged backlog=4096, which shows the value passed, not more than 8 clients queueing.

Known limits

  • Existing, not from this PR: one of five palette-layout-navigation runs crashed at launch, before the scenario started: a SIGSEGV inside getenv on a libghostty font thread while the main thread was also in libghostty. It is consistent with a getenv/setenv race, but the cause is unverified. It happened on the current libghostty pin, nothing in this PR touches startup, and it is not fixed here.
  • The full AT-SPI suite was not run at this tip alone; this PR's CI is its first full run on these commits without the libghostty change. The scenario did pass in the two full runs on the combined branch that follows this PR.

n2tr2 added 2 commits November 1, 2026 16:52
Under a Russian layout xdotool sends a named p through a temporary spare
keycode and unbinds it after the tap. Freezing the app across the press
lost the palette 0/3 opened at 50 ms and 0/6 until xdotool exited, while
the same freeze on a US layout and ctrl+shift+33 under Russian kept it.

Keycode 33 is what a real keyboard sends, and matches the Ctrl-J/K steps.

Claude-Session: https://claude.ai/code/session_01MeR3EkF5tniXNzBrRWmfYZ
n2tr2 added a commit to n2tr2/agterm-linux that referenced this pull request Nov 1, 2026
Brings in melonamin#54's real commits, so this branch merges without a rebase once
melonamin#54 lands. Both sides added atspi_smoke.py scenario lines at the same
spots; the tree is unchanged by this merge.

Claude-Session: https://claude.ai/code/session_01MeR3EkF5tniXNzBrRWmfYZ
@n2tr2
n2tr2 marked this pull request as ready for review November 1, 2026 21:35
@n2tr2
n2tr2 requested a review from melonamin as a code owner November 1, 2026 21:35
@melonamin
melonamin merged commit 5d3f29b into melonamin:linux-port Nov 2, 2026
5 checks passed
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.

2 participants