Skip to content

Instantly share code, notes, and snippets.

@gszep
Last active September 28, 2026 02:50
Show Gist options
  • Select an option

  • Save gszep/93a6dfe7c591fcaf3aa31038c718438b to your computer and use it in GitHub Desktop.

Select an option

Save gszep/93a6dfe7c591fcaf3aa31038c718438b to your computer and use it in GitHub Desktop.
OpenCode authorization-link before/after rendered regression recording
{"version":2,"width":80,"height":14,"timestamp":1790561700,"title":"OpenCode TUI Link: before/after regression recording"}
[0,"o","\u001b[2J\u001b[HBEFORE: authorization link click routing \r\nOpen authorization page \r\n \r\n \r\n \r\n\r\nTest: Ctrl + left click\r\n\r\nProduction Link component; injected mouse events.\r\nBrowser opener counted, not launched. Native terminal handler not recorded.\r\n"]
[3,"o","\u001b[2J\u001b[HBEFORE: authorization link click routing \r\nOpen authorization page \r\n \r\n \r\n \r\n\r\nCtrl click: 1 TUI browser-opener call(s). Expected: 0 (terminal owns it).\r\n\r\nProduction Link component; injected mouse events.\r\nBrowser opener counted, not launched. Native terminal handler not recorded.\r\n"]
[6,"o","\u001b[2J\u001b[HBEFORE: authorization link click routing \r\nOpen authorization page \r\n \r\n \r\n \r\n\r\nPlain click: 1 TUI browser-opener call(s). Expected: 1.\r\n\r\nProduction Link component; injected mouse events.\r\nBrowser opener counted, not launched. Native terminal handler not recorded.\r\n"]
[9,"o","\u001b[2J\u001b[HAFTER: authorization link click routing \r\nOpen authorization page \r\n \r\n \r\n \r\n\r\nTest: Ctrl + left click\r\n\r\nProduction Link component; injected mouse events.\r\nBrowser opener counted, not launched. Native terminal handler not recorded.\r\n"]
[12,"o","\u001b[2J\u001b[HAFTER: authorization link click routing \r\nOpen authorization page \r\n \r\n \r\n \r\n\r\nCtrl click: 0 TUI browser-opener call(s). Expected: 0 (terminal owns it).\r\n\r\nProduction Link component; injected mouse events.\r\nBrowser opener counted, not launched. Native terminal handler not recorded.\r\n"]
[15,"o","\u001b[2J\u001b[HAFTER: authorization link click routing \r\nOpen authorization page \r\n \r\n \r\n \r\n\r\nPlain click: 1 TUI browser-opener call(s). Expected: 1.\r\n\r\nProduction Link component; injected mouse events.\r\nBrowser opener counted, not launched. Native terminal handler not recorded.\r\n"]
{"version": 2, "width": 82, "height": 18, "title": "OpenCode production Link in a real PTY; injected mouse events"}
[0.9025, "o", "\u001b[?2031h\u001b]10;?\u0007\u001b]11;?\u0007\u001b[>0q\u001b[?25l\u001b[s\u001b[6n\u001bP+q4d73\u001b\\\u001b[?1016$p\u001b[?2027$p\u001b[?2031$p\u001b[?1004$p\u001b[?2004$p\u001b[?2026$p\u001b[?u\u001b]99;i=opentui-notifications:p=?;\u001b\\\u001b]1337;Capabilities\u001b\\\u001b_Gi=31337,s=1,v=1,a=q,t=d,f=24;AAAA\u001b\\\u001b[c\u001b[H\u001b]66;w=1; \u001b\\\u001b[6n\u001b[H\u001b]66;s=2; \u001b\\\u001b[6n\u001b[u\u001b[s\u001b[?1049h\u001b[>4;1m\u001b[?2027h\u001b[?2004h"]
[0.9092, "o", "\u001b[?1000h\u001b[?1002h\u001b[?1003h\u001b[?1006h"]
[0.9094, "o", "\u001b[14t"]
[0.9095, "o", "\u001b]4;0;?\u0007"]
[0.9103, "o", "\u001b[?2026h\u001b[?25l\u001b[1;1H\u001b[38;5;15m\u001b[49mOpenCode V2 - modified hyperlink click routing \u001b[2;1H\u001b[38;5;15m\u001b[49mProduction Link components; isolated source build \u001b[3;1H\u001b[38;5;15m\u001b[49mBEFORE \u001b[4;1H\u001b[38;5;15m\u001b[49mOpen authorization page (before)\u001b[0m\u001b[4;33H\u001b[38;5;15m\u001b[49m \u001b[5;1H\u001b[38;5;15m\u001b[49mTUI browser-opener calls: 0 \u001b[6;1H\u001b[38;5;15m\u001b[49mAFTER \u001b[7;1H\u001b[38;5;15m\u001b[49mOpen authorization page (after)\u001b[0m\u001b[7;32H\u001b[38;5;15m\u001b[49m \u001b[8;1H\u001b[38;5;15m\u001b[49mTUI browser-opener calls: 0 \u001b[9;1H\u001b[38;5;15m\u001b[49mInjected Ctrl-click: before +1; after +0. \u001b[10;1H\u001b[38;5;15m\u001b[49mThen ordi"]
[0.9275, "o", "nary left click: both +1. \u001b[11;1H\u001b[38;5;15m\u001b[49mBrowser opener counted. Native terminal handler not reproduced. \u001b[12;1H\u001b[38;5;15m\u001b[49m \u001b[13;1H\u001b[38;5;15m\u001b[49m \u001b[14;1H\u001b[38;5;15m\u001b[49m \u001b[15;1H\u001b[38;5;15m\u001b[49m \u001b[16;1H\u001b[38;5;15m\u001b[49m \u001b[17;1H\u001b[38;5;15m\u001b[49m \u001b[18;1H\u001b[38;5;15m\u001b[49m \u001b[0m\u001b[?2026l"]
[1.1179, "o", "\u001b[?2026h\u001b[?25l\u001b[1;1H\u001b[38;5;15m\u001b[49mOpenCode V2 - modified hyperlink click routing \u001b[2;1H\u001b[38;5;15m\u001b[49mProduction Link components; isolated source build \u001b[3;1H\u001b[38;5;15m\u001b[49mBEFORE \u001b[4;1H\u001b[38;5;15m\u001b[49mOpen authorization page (before)\u001b[0m\u001b[4;33H\u001b[38;5;15m\u001b[49m \u001b[5;1H\u001b[38;5;15m\u001b[49mTUI browser-opener calls: 0 \u001b[6;1H\u001b[38;5;15m\u001b[49mAFTER \u001b[7;1H\u001b[38;5;15m\u001b[49mOpen authorization page (after)\u001b[0m\u001b[7;32H\u001b[38;5;15m\u001b[49m \u001b[8;1H\u001b[38;5;15m\u001b[49mTUI browser-opener calls: 0 \u001b[9;1H\u001b[38;5;15m\u001b[49mInjected Ctrl-click: before +1; after +0. \u001b[10;1H\u001b[38;5;15m\u001b[49mThen ordi"]
[1.214, "o", "nary left click: both +1. \u001b[11;1H\u001b[38;5;15m\u001b[49mBrowser opener counted. Native terminal handler not reproduced. \u001b[12;1H\u001b[38;5;15m\u001b[49m \u001b[13;1H\u001b[38;5;15m\u001b[49m \u001b[14;1H\u001b[38;5;15m\u001b[49m \u001b[15;1H\u001b[38;5;15m\u001b[49m \u001b[16;1H\u001b[38;5;15m\u001b[49m \u001b[17;1H\u001b[38;5;15m\u001b[49m \u001b[18;1H\u001b[38;5;15m\u001b[49m \u001b[0m\u001b[?2026l"]
[3.0101, "o", "\u001b[?2026h\u001b[?25l\u001b[5;27H\u001b[38;5;15m\u001b[49m1\u001b[0m\u001b[0m\u001b[?2026l"]
[9.1089, "o", "\u001b[?2026h\u001b[?25l\u001b[5;27H\u001b[38;5;15m\u001b[49m2\u001b[0m\u001b[0m\u001b[?2026l"]
[10.1595, "o", "\u001b[?2026h\u001b[?25l\u001b[8;27H\u001b[38;5;15m\u001b[49m1\u001b[0m\u001b[0m\u001b[?2026l"]

OpenCode authorization-link click routing

linkfix-before-after.cast is an asciinema v2 recording of the production Link component before and after the fix, rendered by OpenTUI's headless terminal renderer. Mouse events are injected; the browser-opening callback is counted instead of launching browsers. This is a rendered regression demonstration, not a recording of native terminal/browser interaction.

Before: Ctrl-click invokes OpenCode's opener, in addition to any native OSC 8 action performed by the terminal. After: OpenCode leaves the modified click to the terminal. Ordinary left-click continues invoking the opener once.

Replay the downloaded file with asciinema play linkfix-before-after.cast. No credentials, user sessions or installed OpenCode processes are used.

linkfix-live-terminal.cast additionally captures the production OpenTUI renderer running in a real pseudoterminal (82×18). It contains actual ANSI output, with Ctrl-click and ordinary left-click SGR mouse events injected by the recording driver. The before component receives one opener call for Ctrl-click; the fixed component receives zero. Ordinary clicks continue to call the opener.

Both recordings are isolated component demonstrations from the upstream-ready source, not a full CLI/native-browser duplication recording. macOS Terminal window automation timed out, so no desktop screen video is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment