You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aeae62d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/TUI-064-compat-spike.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,28 +8,28 @@ The 0.6.4 API surface was inspected from the published tarball: `npm pack @opent
8
8
9
9
Repo facts the spike assumes:
10
10
11
-
-`@opentui/core` is pinned at `0.5.12` (package.json:107) with 8 platform `optionalDependencies` pins at the same version (package.json:127-134). A real bump must move all 9 pins plus `bun.lock` in one step.
11
+
-`@opentui/core` is pinned at `0.5.12` (package.json:108) with 8 platform `optionalDependencies` pins at the same version (package.json:128-135). A real bump must move all 9 pins plus `bun.lock` in one step.
12
12
- The TUI is the imperative core surface: no React, no Solid, no `@opentui` keymap. `src/tui/**` constructs and wires framework renderables directly (ScrollBox, Select, Textarea, Markdown).
13
13
- Mouse wheel scroll, hover-armed links, and frame assertions against the painted buffer are the load-bearing behaviors; the regression tests read the painted frame through `captureCharFrame` and `captureSpans`.
14
14
15
15
## 2. Breaker inventory
16
16
17
17
Thirteen reflective or monkeypatch sites in `src/tui/**`, with the 0.6.4 disposition of the API each site leans on. "Keep" means the symbols still exist with the same shape in 0.6.4 and needs no code change; "verify" means the symbols survive but their behavior must be re-checked at bump.
18
18
19
-
| # | Site | What it does | 0.6.4 disposition | Risk |
| 1 | shell/overlay-list.ts:144-152 | Reflective `Object.getOwnPropertyDescriptor(select, name)` reads of Select's private `scrollOffset` / `maxVisibleItems` to compute the painted window; any shape miss defaults offset to 1 (overlay-list.ts:146) | Keep: the hack stays necessary -- both fields are still `private` on `SelectRenderable` in 0.6.4 | CL-10639/CL-10642 must not assume this read keeps working across refactors of Select internals; no accessor exposure was added in 0.6.4 |
22
-
| 2 | shell/overlay-list.ts:128-133,164,190-206,240-244 | Placeholder-option pattern: a real `SelectRenderable` gets empty `SelectOption[]` rows (`name: ""`, `description: ""`) and is rebuilt on reshape; the shell paints visible rows itself | Keep | Keyboard and selection geometry come from native Select, rows do not; a Select paint change under the placeholders would double-paint or blank rows |
23
-
| 3 | shell/keys.ts:300-305 | Instance overwrite of protected `onMouseEvent` on prompt and transcript via `as unknown as`, forwarding every `event.type === "scroll"` to the transcript | Keep, verify | 0.6.4 still declares `processMouseEvent` / protected `onMouseEvent`; dispatch is expected to move to native-integration hooks (`defineNativeIntegration`), so where the override gets called from may shift -- verify at bump |
24
-
| 4 | url-links.ts:363 |`Renderable.renderablesByNumber.get(renderer.hitTest(x, y))` static-map walk to resolve the node under the cursor | Keep, verify |`renderablesByNumber` is a static map on the `Renderable` class and `hitTest` is a renderer method; both survive in 0.6.4. Hit-test numbering is native, so behavior is expected to be unchanged but is not provable from `.d.ts`|
25
-
| 5 | url-links.ts:134-183, 385-404 |`armLinkLine` (134-183) assigns all five of `onMouseDown` / `onMouseUp` / `onMouseOver` / `onMouseMove` / `onMouseOut`; `armMarkdownLinks` (385-404) assigns only down, up, and out | Keep | Option-style mouse hooks survive in 0.6.4; hover-only paths additionally depend on pointer-motion delivery (docs/TUI.md, "URL click-through" and the scroll-lease rules at docs/TUI.md:535) |
26
-
| 6 | shell/chrome.ts:644,652-658 | Overlay host positioning: `position = "absolute"`, `zIndex = OVERLAY_FLOAT_Z`, absolute top/left/width vs in-flow relative reset | Keep, verify | absolute + zIndex still supported in 0.6.4 options; paint-slide behavior of an absolutely positioned host under the new paint model is empirical |
27
-
| 7 | shell/chrome.ts:956 |`shell.agentsBox.zIndex = 0` baseline stacking | Keep | Same surface as #6|
28
-
| 8 | prompt-input.ts:51-68 |`TextareaRenderable` plus `Object.defineProperty(area, "value")` proxying `plainText` / `setText` / `cursorOffset`| Keep | All three are still public on `EditBufferRenderable` in 0.6.4 (plainText, setText, cursorOffset get/set) -- safe |
29
-
| 9 | prompt-input.ts:80-92 |`visualCursor.visualRow`, `scrollY`, `lineInfo.lineStartCols` reads for caret row and wrap-intact row count | Keep | All still public in 0.6.4 (lineInfo, scrollY, visualCursor) -- safe |
30
-
| 10 | shell/index.ts:197-213 | Transcript is a `ScrollBoxRenderable` with `stickyScroll: true`, `stickyStart: "bottom"`, and `verticalScrollBar.visible = false`| Keep | ScrollBox / ScrollBar options preserved in 0.6.4, including stickyScroll and viewportCulling; watch the scroll lease semantics of docs/TUI.md:535 under the new attach/dispose surface |
31
-
| 11 | markdown-rows.test.ts:600-622 | Prototype-level reflection: `Object.getOwnPropertyDescriptor(MarkdownRenderable.prototype, "content")` plus a per-instance redefine of the property to count set calls | Keep, verify at bump |`content` is still declared as a getter/setter pair on `MarkdownRenderable` in 0.6.4; this is the highest-risk test helper because redefine-on-instance depends on the accessor being own-configurable there |
32
-
| 12 | src/tui/_.test.ts, src/tui/runner/_.test.ts |`captureCharFrame` / `captureSpans` reads of the painted frame: 248 call-site lines across 51 test files | Keep, verify empirically | The API is kept and exported from `@opentui/core/testing` in 0.6.4; runtime fidelity of captured frames under the new recording-buffer paint model is the empirical unknown of this spike (see section 5) |
19
+
| # | Site | What it does | 0.6.4 disposition | Risk |
| 1 | shell/overlay-list.ts:144-152 | Reflective `Object.getOwnPropertyDescriptor(select, name)` reads of Select's private `scrollOffset` / `maxVisibleItems` to compute the painted window; any shape miss defaults offset to 1 (overlay-list.ts:146) | Keep: the hack stays necessary -- both fields are still `private` on `SelectRenderable` in 0.6.4 | CL-10639/CL-10642 must not assume this read keeps working across refactors of Select internals; no accessor exposure was added in 0.6.4 |
22
+
| 2 | shell/overlay-list.ts:128-133,164,190-206,240-244 | Placeholder-option pattern: a real `SelectRenderable` gets empty `SelectOption[]` rows (`name: ""`, `description: ""`) and is rebuilt on reshape; the shell paints visible rows itself | Keep | Keyboard and selection geometry come from native Select, rows do not; a Select paint change under the placeholders would double-paint or blank rows |
23
+
| 3 | shell/keys.ts:300-305 | Instance overwrite of protected `onMouseEvent` on prompt and transcript via `as unknown as`, forwarding every `event.type === "scroll"` to the transcript | Keep, verify | 0.6.4 still declares `processMouseEvent` / protected `onMouseEvent`; dispatch is expected to move to native-integration hooks (`defineNativeIntegration`), so where the override gets called from may shift -- verify at bump |
24
+
| 4 | url-links.ts:363 |`Renderable.renderablesByNumber.get(renderer.hitTest(x, y))` static-map walk to resolve the node under the cursor | Keep, verify |`renderablesByNumber` is a static map on the `Renderable` class and `hitTest` is a renderer method; both survive in 0.6.4. Hit-test numbering is native, so behavior is expected to be unchanged but is not provable from `.d.ts`|
25
+
| 5 | url-links.ts:134-183, 385-404 |`armLinkLine` (134-183) assigns all five of `onMouseDown` / `onMouseUp` / `onMouseOver` / `onMouseMove` / `onMouseOut`; `armMarkdownLinks` (385-404) assigns only down, up, and out | Keep | Option-style mouse hooks survive in 0.6.4; hover-only paths additionally depend on pointer-motion delivery (docs/TUI.md, "URL click-through" and the scroll-lease rules at docs/TUI.md:535) |
26
+
| 6 | shell/chrome.ts:644,652-658 | Overlay host positioning: `position = "absolute"`, `zIndex = OVERLAY_FLOAT_Z`, absolute top/left/width vs in-flow relative reset | Keep, verify | absolute + zIndex still supported in 0.6.4 options; paint-slide behavior of an absolutely positioned host under the new paint model is empirical |
27
+
| 7 | shell/chrome.ts:956 |`shell.agentsBox.zIndex = 0` baseline stacking | Keep | Same surface as #6|
28
+
| 8 | prompt-input.ts:51-68 |`TextareaRenderable` plus `Object.defineProperty(area, "value")` proxying `plainText` / `setText` / `cursorOffset`| Keep | All three are still public on `EditBufferRenderable` in 0.6.4 (plainText, setText, cursorOffset get/set) -- safe |
29
+
| 9 | prompt-input.ts:80-92 |`visualCursor.visualRow`, `scrollY`, `lineInfo.lineStartCols` reads for caret row and wrap-intact row count | Keep | All still public in 0.6.4 (lineInfo, scrollY, visualCursor) -- safe |
30
+
| 10 | shell/index.ts:197-213 | Transcript is a `ScrollBoxRenderable` with `stickyScroll: true`, `stickyStart: "bottom"`, and `verticalScrollBar.visible = false`| Keep | ScrollBox / ScrollBar options preserved in 0.6.4, including stickyScroll and viewportCulling; watch the scroll lease semantics of docs/TUI.md:535 under the new attach/dispose surface |
31
+
| 11 | markdown-rows.test.ts:600-622 | Prototype-level reflection: `Object.getOwnPropertyDescriptor(MarkdownRenderable.prototype, "content")` plus a per-instance redefine of the property to count set calls | Keep, verify at bump |`content` is still declared as a getter/setter pair on `MarkdownRenderable` in 0.6.4; this is the highest-risk test helper because redefine-on-instance depends on the accessor being own-configurable there |
32
+
| 12 | src/tui/_.test.ts, src/tui/runner/_.test.ts |`captureCharFrame` / `captureSpans` reads of the painted frame: 248 call-site lines across 51 test files | Keep, verify empirically | The API is kept and exported from `@opentui/core/testing` in 0.6.4; runtime fidelity of captured frames under the new recording-buffer paint model is the empirical unknown of this spike (see section 5) |
33
33
| 13 | harness.ts:143,194-200 |`createTestRenderer` from `@opentui/core/testing` (call at harness.ts:143), `renderer.destroy()` teardown (harness.ts:194-195), and process-global tree-sitter client recreation via `getTreeSitterClient()` (harness.ts:196-199) | Keep |`createTestRenderer` (promise-based setup) and `getTreeSitterClient` both survive in 0.6.4, which additionally adds `dispose` / asyncDispose on the setup object |
34
34
35
35
Note: The site in #4 is the only reflective static-map walk in the tree.
0 commit comments