Repository navigation
fix(types): make TerminalSnapshot.cursorVisible required, document DECSTR limit - #38
Conversation
The native binding always sets it, and no published release has the optional form, so the type now says what callers get. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ Change-Id: I19f990d6a9dedbcf1f7ee49d4f1658768bcc37e1 Signed-off-by: Thomas Kosiewski <tk@coder.com>
A test pins the current behavior, so moving the Ghostty pin past the upstream DECSTR commit (#37) fails it and flags the README note. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ Change-Id: Idd55a075938efaf6faaff08c4cd144947a2dae07 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
PASS Independent verification of PR #38 by a verifier that did not write the code. I built and packed each commit with the
Each typecheck ran The runtime journey (11 checks) gave the same output on parent, head and merge, check by check. So the runtime did not change. The new test detects a reset. I replaced Edge case. DECSTR prints nothing, also when a write splits it. Generated with |
## Why Ship the changes merged since `0.1.0-beta.1` to npm. They include mode-aware mouse encoding (#12), the new snapshot attributes and `cursorVisible` (#17, #38), and Ghostty `v1.4.0` with DECSTR support (#43). ## What changed - `package.json` and `package-lock.json` go from `0.1.0-beta.1` to `0.1.0-beta.2`. The branch name matches the version, so `publish.yml` creates `v0.1.0-beta.2` after merge. - The `release-changelog` workflow adds the CHANGELOG entry to this branch. - `communique.toml` raises `max_tokens` to 16384. With Communique 1.0.3's default of 4096, generating these notes failed twice with "submit_release_notes was malformed 3 times". The next run succeeded. - `prepare-release-changelog.mjs` now detects Communique's `## [vX](url) - date` heading. Before, every push regenerated the entry over hand edits. - I corrected the generated entry. `cursorVisible` and `encodeMouse` first ship in this release, so they are listed as Added, not as changes or fixes. ## Blast Radius The merge publishes `0.1.0-beta.2` to npm under the `beta` dist-tag. `latest` stays on `0.1.0-beta.0`. Consumers that build a `TerminalSnapshot` themselves must now set `cursorVisible` (#38). ## Verification - `RELEASE_BRANCH_NAME=release/v0.1.0-beta.2 node .github/scripts/prepare-release-changelog.mjs origin/main` prints `should_generate=true` and `tag_name=v0.1.0-beta.2`. `resolve-npm-publish-tag.mjs` prints `beta`. - `npm run typecheck` and `npm test` (73 passed). - Three independent verifier passes, the last PASS+NOTES on the head. They check every CHANGELOG bullet against the `v0.1.0-beta.1` tag and confirm that the packed tarball loads its addon from `prebuilds/`. - The local linux-x64 prebuild steps from `mise run release-prebuilds` pass: `build:libghostty`, `build`, `build:prebuild`, `verify:prebuilds` and `npm pack --dry-run`. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Closes #36
Why
Snapshots from the native binding always carry
cursorVisible, but the type marked it optional, so every reader had to handleundefined. Separately, a DECSTR soft reset (ESC[!p) leaves the cursor hidden, and nothing said so.What changed
TerminalSnapshot.cursorVisibleis now required (boolean), insrc/types.tsand thesrc/README.mdcontract.ESC c) still resets. A test pins that behavior.Scope
Tradeoffs
cursorVisibleyet (0.1.0-beta.1predates it), so making it required now breaks no released consumer.Blast Radius
Code that builds its own
TerminalSnapshotmust now setcursorVisible. coder/agent-tty does this inassertNativeSnapshotand will get TS2741 when it upgrades. That is the line where it currently drops the field. Readers are unaffected.Verification
npm run build,typecheck,test(68 passed) andsmokepass locally.mainand this branch and compiled a strict consumer against each.const v: boolean = snapshot().cursorVisiblefails with TS2322 onmainand compiles here. ATerminalSnapshotliteral without the field compiles onmainand fails with TS2741 here.ESC[?25l ESC[7m ESC[!pleavescursorVisible: falseandinverse: true. A followingESC cgivescursorVisible: trueand no attributes.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high