Skip to content

docs: refresh the termlens skill copy for the 0.9 drag signature - #48

Merged
vyncint merged 1 commit into
mainfrom
docs/termlens-skill-0.9
Sep 6, 2026
Merged

docs: refresh the termlens skill copy for the 0.9 drag signature#48
vyncint merged 1 commit into
mainfrom
docs/termlens-skill-0.9

Conversation

@vyncint

@vyncint vyncint commented Sep 6, 2026

Copy link
Copy Markdown
Owner

The bundled copy of the termlens skill described an API that no longer exists.

-`drag(button, (col, row), (col, row))`. Never
- pass a `find` result straight into `drag` — the tuple types match and
- the axes do not.
+`drag(button, from_col, from_row, to_col,
+ to_row)`. The four drag arguments make a transposed `find` result
+ unwritable without explicitly choosing the coordinate order.

termlens 0.9 takes five flat arguments:

pub fn drag(&mut self, button: impl Into<MouseChord>,
            from_col: u16, from_row: u16, to_col: u16, to_row: u16) -> Result<()>

So the stale text was wrong twice over: it gave a call shape that does not
compile, and it warned about a footgun (the tuple types match and the axes do not) that the new signature exists to eliminate.

Taken verbatim from termlens/skills/termlens/SKILL.md, the source of truth,
which was already correct. Verified against the real 0.9.0 signatures rather
than trusted: Screen::find returns (row, col), while click, click_with,
scroll and resize are all column-first.

Found while installing the skill into oxmera and diffing against the canonical.
All three repositories that bundle it — mossaic, launchbound, reconverge — had
byte-identical stale copies; this is one of three identical PRs.

No behaviour change: this file is agent guidance, not code.

The bundled copy described `drag(button, (col, row), (col, row))` and
warned that "the tuple types match and the axes do not" — a real hazard in
the API it was written against, and one termlens designed out. 0.9 takes
five flat arguments:

    pub fn drag(&mut self, button: impl Into<MouseChord>,
                from_col: u16, from_row: u16, to_col: u16, to_row: u16)

so a transposed `find` result is now a compile error rather than a silent
axis swap. The copy here gave a call shape that does not compile and
cautioned about a footgun that no longer exists.

Taken verbatim from termlens/skills/termlens/SKILL.md, which is the source
of truth and was already correct; verified against the signatures in
termlens 0.9.0 rather than trusted: `find` returns (row, col), while
`click`, `click_with`, `scroll` and `resize` are column-first.

No behaviour change — this file is agent guidance, not code.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit 25544cd into main Sep 6, 2026
8 checks passed
@vyncint
vyncint deleted the docs/termlens-skill-0.9 branch September 6, 2026 09:02
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