arkaos 3.70.4 → 3.70.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 3.70.4
1
+ 3.70.5
@@ -16,6 +16,7 @@ interface Props {
16
16
  session?: ReturnType<typeof useTerminalSession>
17
17
  onInputLine?: (line: string) => void
18
18
  theme?: XtermTheme
19
+ active?: boolean
19
20
  }
20
21
  const props = defineProps<Props>()
21
22
 
@@ -58,12 +59,23 @@ onMounted(async () => {
58
59
  t.loadAddon(new WebLinksAddon())
59
60
  t.loadAddon(searchAddon)
60
61
  t.open(container.value)
61
- fitAddon.fit()
62
62
 
63
63
  term.value = t
64
64
  fit.value = fitAddon
65
65
  search.value = searchAddon
66
66
 
67
+ // v3.70.5 — wait for paint so the container has its final width
68
+ // before fit() reads it. Without this, fit() ran with a 0x0 box on
69
+ // first mount and shells started at the default 80 cols, leaving
70
+ // empty space on the right of the canvas.
71
+ await nextTick()
72
+ await new Promise<void>((resolve) => requestAnimationFrame(() => resolve()))
73
+ try {
74
+ fitAddon.fit()
75
+ } catch (_e) {
76
+ // dom layout not ready — ResizeObserver below will recover
77
+ }
78
+
67
79
  await session.open()
68
80
 
69
81
  unsubscribeOutput = session.onOutput((chunk) => {
@@ -123,11 +135,17 @@ onMounted(async () => {
123
135
  session.sendInput(data)
124
136
  })
125
137
 
126
- // Initial size sync once the WS is open.
138
+ // Initial size sync once the WS is open. v3.70.5 — fit *again* on
139
+ // open because the layout might have changed during the WS round-
140
+ // trip (sidebar collapse, tab switch, etc.).
127
141
  watch(session.status, (s) => {
128
142
  if (s === 'open') {
129
- const { cols, rows } = t
130
- session.sendResize(cols, rows)
143
+ requestAnimationFrame(() => {
144
+ try {
145
+ fitAddon.fit()
146
+ } catch (_e) { /* layout not ready */ }
147
+ session.sendResize(t.cols, t.rows)
148
+ })
131
149
  }
132
150
  }, { immediate: true })
133
151
 
@@ -140,8 +158,33 @@ onMounted(async () => {
140
158
  }
141
159
  })
142
160
  resizeObserver.observe(container.value)
161
+
162
+ // v3.70.5 — refit when this tab becomes the active one. v-show keeps
163
+ // inactive tabs mounted with display:none, where ResizeObserver
164
+ // doesn't fire. Switching back requires an explicit refit.
165
+ watch(() => props.active, (isActive) => {
166
+ if (!isActive || !term.value || !fit.value) return
167
+ nextTick(() => {
168
+ requestAnimationFrame(() => {
169
+ try {
170
+ fit.value?.fit()
171
+ session.sendResize(term.value!.cols, term.value!.rows)
172
+ } catch (_e) { /* layout not ready */ }
173
+ })
174
+ })
175
+ })
143
176
  })
144
177
 
178
+ function refit() {
179
+ if (!term.value || !fit.value) return
180
+ try {
181
+ fit.value.fit()
182
+ session.sendResize(term.value.cols, term.value.rows)
183
+ } catch (_e) {
184
+ // layout not ready
185
+ }
186
+ }
187
+
145
188
  onBeforeUnmount(async () => {
146
189
  unsubscribeOutput?.()
147
190
  resizeObserver?.disconnect()
@@ -157,6 +200,7 @@ defineExpose({
157
200
  status: session.status,
158
201
  error: session.error,
159
202
  meta: session.meta,
203
+ refit,
160
204
  })
161
205
  </script>
162
206
 
@@ -180,7 +224,7 @@ defineExpose({
180
224
  </span>
181
225
  <span v-else class="text-muted">closed</span>
182
226
  </div>
183
- <div ref="container" class="absolute inset-0 p-2" />
227
+ <div ref="container" class="absolute inset-0" />
184
228
  </div>
185
229
  </template>
186
230
 
@@ -188,7 +232,7 @@ defineExpose({
188
232
  :deep(.xterm) {
189
233
  height: 100%;
190
234
  width: 100%;
191
- padding: 4px;
235
+ padding: 8px 12px;
192
236
  }
193
237
  :deep(.xterm-viewport) {
194
238
  background-color: transparent !important;
@@ -321,6 +321,7 @@ const showHistory = ref(false)
321
321
  v-show="activeId === tab.id"
322
322
  :session="tab.session"
323
323
  :on-input-line="recordCommand"
324
+ :active="activeId === tab.id"
324
325
  class="absolute inset-0"
325
326
  />
326
327
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "3.70.4",
3
+ "version": "3.70.5",
4
4
  "description": "The Operating System for AI Agent Teams",
5
5
  "type": "module",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "arkaos-core"
3
- version = "3.70.4"
3
+ version = "3.70.5"
4
4
  description = "Core engine for ArkaOS — The Operating System for AI Agent Teams"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}