<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-cj-window-toggle-lib.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-28T01:48:12+00:00</updated>
<entry>
<title>fix(vterm): never reopen the F9/F12 windows from the top</title>
<updated>2026-05-28T01:48:12+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-28T01:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=7833fb8bc0e3f9ece01ab2fe6fe07ded0efc4af4'/>
<id>urn:sha1:7833fb8bc0e3f9ece01ab2fe6fe07ded0efc4af4</id>
<content type='text'>
F9 brought the agent window down from the top of the frame. The toggle remembers where the window last sat and replays it, and "above" was a position it could capture and replay: move the window to the top with the buffer-move keys, toggle off, and the next toggle reopened it up there. The host default never picks the top, so a remembered "above" was the only way in.

I added an optional allowed-directions list to cj/window-toggle-capture-state, the helper both F9 (ai-vterm) and F12 (vterm-config) share. When the captured direction isn't in the list, it falls back to the default direction and clears the saved size, since that size was measured on the disallowed axis and wouldn't transfer. Both dispatchers now pass (right below left), so neither can remember a top placement. They go through the same helper, so the rule stays in one place.

Three tests cover the new branch: a permitted direction is kept, a disallowed one falls back with the size cleared, and an omitted list preserves the old unconstrained behavior so existing callers are unaffected.
</content>
</entry>
<entry>
<title>feat(window): remember a side window's size across toggles</title>
<updated>2026-05-27T19:36:57+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-27T19:36:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=84d8ab6a3ad97697a717a770c42010e9ec9076e5'/>
<id>urn:sha1:84d8ab6a3ad97697a717a770c42010e9ec9076e5</id>
<content type='text'>
The F10 music playlist opened at a fixed fraction every time, so any manual resize was lost the moment it was toggled closed. Now the toggle captures the window's size on close and reopens at that height, for the rest of the session.

The mechanism is generic, not music-specific. cj/window-size-fraction (geometry-lib) is the pure kernel: a clamped window/frame ratio. cj/side-window-capture-size and cj/side-window-display (toggle-lib) wrap it for any display-buffer-in-side-window consumer — height for top/bottom, width for left/right — storing the remembered fraction in a caller-supplied state var. It mirrors the direction-split toggle pattern the vterm dispatchers already use, but for atomic side windows that can't be split.

music-config wires F10 to it: cj/music-playlist-window-height is the default, cj/--music-playlist-height holds the remembered value (in-memory, resets each session).

12 new tests across the two libs, Normal/Boundary/Error each covered.
</content>
</entry>
<entry>
<title>refactor(cj-window-toggle): rename to cj-window-toggle-lib for naming consistency</title>
<updated>2026-05-10T20:28:31+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-10T20:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a2e41803d7d29a43ed37a5cf9fd7fe53ca5c15b5'/>
<id>urn:sha1:a2e41803d7d29a43ed37a5cf9fd7fe53ca5c15b5</id>
<content type='text'>
Rename modules/cj-window-toggle.el -&gt; modules/cj-window-toggle-lib.el
and tests/test-cj-window-toggle.el -&gt; tests/test-cj-window-toggle-lib.el.
Update provide forms, file headers, and the (require 'cj-window-toggle)
call sites in ai-vterm.el, vterm-config.el, and the test file.

Same rationale as the cj-cache and cj-org-text renames -- library files
in this codebase are suffixed `-lib'.  No behavior change.
</content>
</entry>
</feed>
