opencode-sesh 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.6] - 2026-10-08
9
+
10
+ ### Fixed
11
+
12
+ - **tui:** Prevent undefined menuBox dereference during sidebar render
13
+
14
+ ## [1.0.5] - 2026-10-08
15
+
16
+ ### Fixed
17
+
18
+ - **packaging:** Declare TUI runtime peer dependencies
19
+
8
20
  ## [1.0.4] - 2026-10-08
9
21
 
10
22
  ### Fixed
@@ -442,6 +454,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
442
454
  - Fixture-database regression suite, TypeScript typechecking, and ShellCheck in
443
455
  CI.
444
456
 
457
+ [1.0.6]: https://github.com/ozandogrultan/opencode-sesh/compare/v1.0.5...v1.0.6
458
+ [1.0.5]: https://github.com/ozandogrultan/opencode-sesh/compare/v1.0.4...v1.0.5
445
459
  [1.0.4]: https://github.com/ozandogrultan/opencode-sesh/compare/v1.0.3...v1.0.4
446
460
  [1.0.3]: https://github.com/ozandogrultan/opencode-sesh/compare/v1.0.2...v1.0.3
447
461
  [1.0.2]: https://github.com/ozandogrultan/opencode-sesh/compare/v1.0.1...v1.0.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sesh",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Browse, search, preview and resume opencode sessions from the terminal and the TUI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -61,7 +61,10 @@
61
61
  "prepublishOnly": "bun run test && bun run typecheck"
62
62
  },
63
63
  "peerDependencies": {
64
- "@opencode/plugin": ">=2.0.0"
64
+ "@opencode/plugin": ">=2.0.0",
65
+ "@opentui/core": ">=0.5.8",
66
+ "@opentui/solid": ">=0.5.8",
67
+ "solid-js": ">=1.9.0"
65
68
  },
66
69
  "devDependencies": {
67
70
  "@commitlint/cli": "^21.2.2",
@@ -1257,14 +1257,15 @@ function SidebarSessions(props: { api: TuiPluginApi } & PinProps) {
1257
1257
  onChange: setMenuState,
1258
1258
  })
1259
1259
 
1260
- const menuBox = createMemo(() => {
1260
+ const menuView = createMemo(() => {
1261
1261
  const state = menuState()
1262
1262
  if (!state) return undefined
1263
- return contextMenuBox(
1263
+ const box = contextMenuBox(
1264
1264
  { x: state.x, y: state.y, ...contextMenuSize(state.items) },
1265
1265
  props.api.renderer.width,
1266
1266
  props.api.renderer.height,
1267
1267
  )
1268
+ return { state, box }
1268
1269
  })
1269
1270
 
1270
1271
  let disposeHoverSpace: (() => void) | undefined
@@ -1677,13 +1678,14 @@ function SidebarSessions(props: { api: TuiPluginApi } & PinProps) {
1677
1678
  container.zIndex = 1000
1678
1679
  }}
1679
1680
  >
1680
- <Show when={menuState()}>
1681
+ <Show when={menuView()} keyed>
1682
+ {(view) => (
1681
1683
  <box
1682
1684
  position="absolute"
1683
- left={menuBox()!.left}
1684
- top={menuBox()!.top}
1685
- width={menuBox()!.width}
1686
- height={menuBox()!.height}
1685
+ left={view.box.left}
1686
+ top={view.box.top}
1687
+ width={view.box.width}
1688
+ height={view.box.height}
1687
1689
  flexDirection="column"
1688
1690
  border
1689
1691
  borderStyle="rounded"
@@ -1694,11 +1696,11 @@ function SidebarSessions(props: { api: TuiPluginApi } & PinProps) {
1694
1696
  onMouseDown={(event: { stopPropagation: () => void }) => event.stopPropagation()}
1695
1697
  onMouseUp={(event: { stopPropagation: () => void }) => event.stopPropagation()}
1696
1698
  >
1697
- <For each={menuState()!.items}>
1699
+ <For each={view.state.items}>
1698
1700
  {(item, index) => (
1699
1701
  <box
1700
1702
  height={1}
1701
- backgroundColor={menuState()!.index === index() ? theme().backgroundElement : RGBA.fromInts(0, 0, 0, 0)}
1703
+ backgroundColor={view.state.index === index() ? theme().backgroundElement : RGBA.fromInts(0, 0, 0, 0)}
1702
1704
  onMouseOver={() => menu.select(index())}
1703
1705
  onMouseDown={(event: { stopPropagation: () => void }) => event.stopPropagation()}
1704
1706
  onMouseUp={(event: { button?: number; stopPropagation: () => void }) => {
@@ -1712,7 +1714,7 @@ function SidebarSessions(props: { api: TuiPluginApi } & PinProps) {
1712
1714
  fg:
1713
1715
  item.id === "delete" || item.id === "confirm"
1714
1716
  ? theme().error
1715
- : menuState()!.index === index()
1717
+ : view.state.index === index()
1716
1718
  ? theme().text
1717
1719
  : theme().textMuted,
1718
1720
  }}
@@ -1723,6 +1725,7 @@ function SidebarSessions(props: { api: TuiPluginApi } & PinProps) {
1723
1725
  )}
1724
1726
  </For>
1725
1727
  </box>
1728
+ )}
1726
1729
  </Show>
1727
1730
  </Portal>
1728
1731
  </box>