heyquilt 0.3.159 → 0.3.161

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/RELEASES.md CHANGED
@@ -11,6 +11,15 @@ Format: `## <version> — <YYYY-MM-DD>`, an optional one-line summary, then bull
11
11
  Lead each bullet with a short bold phrase. Inline `code` and **bold** are rendered;
12
12
  nothing else is.
13
13
 
14
+ ## 0.3.161 — 2026-11-12
15
+
16
+ - **An opened app reads at a glance.** Its actions sit under a green **Reads on its own** badge and a vermilion **Asks someone first** badge. Each action has an icon for what it does: search, create, edit, delete or send. **Show more** opens the rest of each list.
17
+ - **Opening an app low on the page scrolls it into view.** The page follows as the list pours open, so the whole list ends up on screen and the card's top stays in view.
18
+
19
+ ## 0.3.160 — 2026-11-12
20
+
21
+ - **An app's card pours open.** Click an app on the Connections page and its card flows down into one shape with the list of what it can do, spreading out to the full width as it grows. A second click or Escape draws it back in. The card keeps its name, logo and **Connect**, so the list below shows only the app's actions.
22
+
14
23
  ## 0.3.159 — 2026-11-12
15
24
 
16
25
  - **See what an app can do before you connect it.** Click an app on the Connections page and a row opens under it: all it says about itself, how you sign in, and what agents can do with it. What they read on their own and what asks someone first (anything that sends, creates, changes or deletes) are listed apart.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyquilt",
3
- "version": "0.3.159",
3
+ "version": "0.3.161",
4
4
  "description": "Real-time, tool-agnostic pair vibe coding: sync a project folder live between collaborators using any AI coding tool.",
5
5
  "author": {
6
6
  "name": "Daniel Carmichael",
@@ -127,6 +127,8 @@ export function composioClient ({ apiKey = '', base = COMPOSIO_API, fetch: fetch
127
127
  // What an app lets agents do, for its card on the Connections page, cached CATALOG_MS: up to 100 of its actions
128
128
  // (the ones Composio marks important first, none deprecated), and how many it has in all.
129
129
  const actionsCache = new Map()
130
+ // A description cut to `n` characters at a word, with an ellipsis when it was cut.
131
+ const short = (text, n) => text.length <= n ? text : `${text.slice(0, n).replace(/\s+\S*$/, '')}…`
130
132
  async function appActions (app) {
131
133
  const hit = actionsCache.get(app)
132
134
  if (hit && Date.now() - hit.at < CATALOG_MS) return hit.value
@@ -136,7 +138,7 @@ export function composioClient ({ apiKey = '', base = COMPOSIO_API, fetch: fetch
136
138
  // The ones Composio marks important first, then the rest as it lists them.
137
139
  const important = (t) => ((t.tags || []).includes('important') ? 0 : 1)
138
140
  const actions = live.map((t, i) => ({ t, i })).sort((x, y) => important(x.t) - important(y.t) || x.i - y.i).map(({ t }) => toolView(t))
139
- .map((t) => ({ slug: t.slug, name: t.name, description: t.description.split(/(?<=\.)\s/)[0].slice(0, 200), readOnly: t.readOnly }))
141
+ .map((t) => ({ slug: t.slug, name: t.name, description: short(t.description.split(/(?<=\.)\s/)[0], 240), readOnly: t.readOnly }))
140
142
  const value = { actions, total: Number(total) || actions.length }
141
143
  actionsCache.set(app, { at: Date.now(), value })
142
144
  return value
package/src/ui/app.css CHANGED
@@ -3675,3 +3675,41 @@ button.sh-repo:hover { color: var(--text); }
3675
3675
  .kl-dcols ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
3676
3676
  .kl-dcols li { display: flex; flex-direction: column; gap: 2px; } .kl-dcols li b { font-size: 13.5px; font-weight: 500; } .kl-dcols li small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
3677
3677
  @media (max-width: 760px) { .kl-dcols { grid-template-columns: 1fr; } }
3678
+
3679
+ /* The open card and its row as one liquid shape (drawn by connections.js behind both): the card loses its own box,
3680
+ the row pours out of it */
3681
+ .kl-grid { position: relative; isolation: isolate; }
3682
+ .kl-grid > .kl-card, .kl-grid > .kl-detail { position: relative; z-index: 1; }
3683
+ .kl-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
3684
+ .kl-shape path { fill: var(--panel); stroke: var(--border-strong); stroke-width: 1; }
3685
+ .kl-card.open, .kl-card.open:hover { background: transparent; border-color: transparent; }
3686
+ .kl-card.open .kl-t small { -webkit-line-clamp: unset; display: block; }
3687
+ .kl-card.busy { cursor: progress; opacity: .7; }
3688
+ .kl-detail { padding: 0; border: 0; border-radius: 0; background: none; animation: none; overflow: hidden; gap: 0; }
3689
+ .kl-dinner { padding: 6px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
3690
+ .kl-dcols { padding-top: 0; border-top: 0; }
3691
+
3692
+ /* The opened app's actions: a tinted badge heading each column (green for what agents read on their own, vermilion
3693
+ for what asks first), and each action a row with an icon for what it does */
3694
+ .kl-dcols { gap: 32px; }
3695
+ .kl-dch { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
3696
+ .kl-dbadge { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
3697
+ .kl-dbadge svg { width: 15px; height: 15px; }
3698
+ .kl-dbadge i { font-style: normal; font-weight: 600; font-size: 11.5px; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px; border-radius: 999px; display: inline-grid; place-items: center; background: color-mix(in srgb, currentColor 16%, transparent); }
3699
+ .kl-dcol.reads .kl-dbadge { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
3700
+ .kl-dcol.asks .kl-dbadge { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--panel)); }
3701
+ .kl-dch small { font-size: 12.5px; line-height: 1.5; color: var(--faint); }
3702
+ .kl-dcols ul { gap: 2px; margin-top: 12px; }
3703
+ .kl-dcols li { flex-direction: row; align-items: flex-start; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; transition: background .12s; }
3704
+ .kl-dcols li:hover { background: color-mix(in srgb, var(--text) 4%, var(--panel)); }
3705
+ .kl-dcols li > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
3706
+ .kl-vi { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--panel-2); color: var(--muted); }
3707
+ .kl-vi svg { width: 14px; height: 14px; }
3708
+ .kl-dcol.reads .kl-vi { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
3709
+ .kl-dcol.asks .kl-vi { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
3710
+ .kl-dmore { margin-top: 8px; height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--text); font: 600 12.5px var(--sans); cursor: pointer; }
3711
+ .kl-dmore:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--text) 4%, var(--panel)); }
3712
+ .kl-dnone { margin: 12px 0 0; font-size: 12.5px; color: var(--faint); }
3713
+ .kl-dfoot { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--faint); }
3714
+ .kl-dfoot svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
3715
+ .kl-dcols li small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@@ -21,8 +21,9 @@ const logoHtml = (a) => a.logo
21
21
  */
22
22
  export function mountConnections (root, { type, id, page = false, sessions = [], callsRoom = null, me = '' }) {
23
23
  // The catalog: `apps` the page shown so far, `total` how many match, `cat` the category picked ('' every app).
24
- const ui = { search: '', apps: null, total: 0, all: 0, groups: [], group: '', open: null, loadingMore: false, busy: '', error: '', calls: null, confirm: null }
24
+ const ui = { search: '', apps: null, total: 0, all: 0, groups: [], group: '', open: null, pour: null, loadingMore: false, busy: '', error: '', calls: null, confirm: null }
25
25
  const details = new Map() // app slug -> { actions, total } or { error }, for its opened card
26
+ ui.more = new Set() // `${slug}:reads` / `${slug}:asks`: lists opened to every action
26
27
  let view = views.get(`${type}:${id}`) || null
27
28
  let alive = true
28
29
  let poll = null
@@ -57,33 +58,141 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
57
58
 
58
59
  // An opened card's row under it (Daniel, 2026-11-12): all it says about itself, how you sign in, and what agents
59
60
  // can do with it, split the way Quilt runs it: reads at once, anything that changes something asks a person first.
60
- const SIGN_IN = { oneclick: 'Sign in with one click: Composio asks the app for you, and Quilt never sees the login.', key: 'Uses your own API key: Composio asks for it once, and keeps it.', none: 'No sign-in: agents can use it as it is.' }
61
- function openRowHtml (a, connected) {
61
+ // What an action does, as a small icon from its name: search and read, create, change, delete, send.
62
+ const SEARCH = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>'
63
+ const HAND = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 11V6a2 2 0 0 0-4 0v5M14 10V4a2 2 0 0 0-4 0v6M10 10.5V6a2 2 0 0 0-4 0v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-6-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>'
64
+ function verbIcon (t) {
65
+ const words = `${t.slug} ${t.name}`.toUpperCase()
66
+ if (/\b(DELETE|REMOVE|ARCHIVE|CANCEL|TRASH)/.test(words)) return I.trash
67
+ if (/\b(SEND|REPLY|POST_MESSAGE|INVITE|SHARE|FORWARD|NOTIFY|PUBLISH)/.test(words)) return I.send
68
+ if (/\b(CREATE|ADD|NEW|INSERT|UPLOAD|SUBMIT|START)/.test(words)) return I.plus
69
+ if (/\b(UPDATE|EDIT|MODIFY|SET|CONFIGURE|MANAGE|MOVE|RENAME|CHANGE|CLEAN)/.test(words)) return I.pencil
70
+ if (/\b(SEARCH|FIND|QUERY|LOOKUP|AUTOCOMPLETE)/.test(words)) return SEARCH
71
+ return t.readOnly ? I.eye : I.pencil
72
+ }
73
+ // An opened card's row (Daniel, 2026-11-12): only what the app can do, split the way Quilt runs it: what agents read
74
+ // on their own, and what asks a person first. Six of each, the rest a click away.
75
+ function openRowHtml (a) {
62
76
  const d = details.get(a.slug)
63
- const list = (xs) => xs.slice(0, 6).map((t) => `<li><b>${esc(t.name)}</b><small>${esc(t.description)}</small></li>`).join('')
77
+ const SHOWN = 6
78
+ const col = (kind, title, note, icon, xs) => {
79
+ const all = ui.more.has(`${a.slug}:${kind}`)
80
+ const list = all ? xs : xs.slice(0, SHOWN)
81
+ return `<div class="kl-dcol ${kind}"><div class="kl-dch"><span class="kl-dbadge">${icon}${esc(title)}<i>${xs.length}</i></span><small>${esc(note)}</small></div>
82
+ ${xs.length ? `<ul>${list.map((t) => `<li><span class="kl-vi">${verbIcon(t)}</span><span><b>${esc(t.name)}</b><small>${esc(t.description)}</small></span></li>`).join('')}</ul>` : '<p class="kl-dnone">None among its actions.</p>'}
83
+ ${xs.length > SHOWN ? `<button type="button" class="kl-dmore" data-more-actions="${esc(a.slug)}:${kind}">${all ? 'Show fewer' : `Show ${xs.length - SHOWN} more`}</button>` : ''}</div>`
84
+ }
64
85
  const reads = d && !d.error ? d.actions.filter((t) => t.readOnly) : []
65
86
  const changes = d && !d.error ? d.actions.filter((t) => !t.readOnly) : []
66
- const busy = ui.busy === a.slug
67
- const act = a.how === 'none' ? '<span class="kl-ready">Ready to use</span>' : `<button type="button" class="btn primary" data-connect="${esc(a.slug)}"${busy ? ' disabled' : ''}>${busy ? 'Opening…' : connected ? `Add another ${esc(a.name)}` : `Connect ${esc(a.name)}`}</button>`
68
87
  const what = !d ? `<p class="hint">${loadingNote()}</p>`
69
88
  : d.error ? `<p class="hint">${esc(d.error)}</p>`
70
- : `<div class="kl-dcols">
71
- <div><h4>Reads on its own <i>${reads.length}</i></h4><p class="kl-dnote">Agents use these at once.</p>${reads.length ? `<ul>${list(reads)}</ul>` : '<p class="hint">None among its main actions.</p>'}${reads.length > 6 ? `<p class="kl-dnote">and ${reads.length - 6} more</p>` : ''}</div>
72
- <div><h4>Asks someone first <i>${changes.length}</i></h4><p class="kl-dnote">Sends, creates, changes or deletes: a card in the session's chat asks a person to approve each one.</p>${changes.length ? `<ul>${list(changes)}</ul>` : '<p class="hint">None among its main actions.</p>'}${changes.length > 6 ? `<p class="kl-dnote">and ${changes.length - 6} more</p>` : ''}</div>
73
- </div>
74
- ${d.total > d.actions.length ? `<p class="kl-dnote">From ${d.actions.length} of its ${d.total.toLocaleString()} actions; agents find the rest when they need them.</p>` : ''}`
75
- return `<div class="kl-detail" data-detail="${esc(a.slug)}">
76
- <div class="kl-dh">${logoHtml(a)}<div><b>${esc(a.name)}</b><small>${esc(SIGN_IN[a.how] || '')}</small></div>${act}<button type="button" class="kl-x" data-close-open aria-label="Close">${I.x}</button></div>
77
- ${a.description ? `<p class="kl-ddesc">${esc(a.description)}</p>` : ''}
78
- ${what}
79
- </div>`
89
+ : `<div class="kl-dcols">${col('reads', 'Reads on its own', 'Agents use these right away.', I.eye, reads)}${col('asks', 'Asks someone first', 'Anything that sends, creates, changes or deletes waits for a person to approve it in the session’s chat.', HAND, changes)}</div>
90
+ ${d.total > d.actions.length ? `<p class="kl-dfoot">${I.sparkle || ''}Showing ${d.actions.length} of its ${d.total.toLocaleString()} actions. Agents find the rest when they need them.</p>` : ''}`
91
+ // Only what it can do: its name, logo and Connect are on the card it flows out of.
92
+ return `<div class="kl-detail" data-detail="${esc(a.slug)}"><div class="kl-dinner">${what}</div></div>`
80
93
  }
94
+ // Opening: its actions are fetched first, so the row pours out of the card at its full height; a second click (or
95
+ // Escape) draws it back in.
81
96
  async function openApp (slug) {
82
- ui.open = ui.open === slug ? null : slug
97
+ if (ui.open === slug) return closeApp()
98
+ const card = root.querySelector(`.kl-card[data-open="${CSS.escape(slug)}"]`)
99
+ if (!details.has(slug)) {
100
+ card?.classList.add('busy')
101
+ try { const r = await api('GET', `/api/connections/apps/${encodeURIComponent(slug)}`); details.set(slug, { actions: r.actions || [], total: r.total || 0 }) } catch (err) { details.set(slug, { error: err.message, actions: [], total: 0 }) }
102
+ card?.classList.remove('busy')
103
+ }
104
+ ui.open = slug
105
+ ui.pour = 'in'
83
106
  draw()
84
- if (!ui.open || details.has(slug)) return
85
- try { const r = await api('GET', `/api/connections/apps/${encodeURIComponent(slug)}`); details.set(slug, { actions: r.actions || [], total: r.total || 0 }) } catch (err) { details.set(slug, { error: err.message, actions: [], total: 0 }) }
86
- if (ui.open === slug) draw()
107
+ }
108
+ function closeApp () {
109
+ if (!ui.open) return
110
+ const det = root.querySelector('.kl-detail')
111
+ if (!det || reduced()) { ui.open = null; draw(); return }
112
+ pour(det, 'out', () => { ui.open = null; draw() })
113
+ }
114
+ const reduced = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches
115
+ // An app opened low on the page: the page scrolls along as it pours, so the whole row ends up in view (keeping the
116
+ // card's top in view when the row is taller than the window).
117
+ function bringIntoView (det, full) {
118
+ let sc = det.parentElement
119
+ while (sc && sc !== document.body && !/(auto|scroll)/.test(getComputedStyle(sc).overflowY)) sc = sc.parentElement
120
+ if (!sc || sc === document.body) return
121
+ const card = det.parentElement.querySelector('.kl-card.open')
122
+ const S = sc.getBoundingClientRect()
123
+ const top = (card || det).getBoundingClientRect().top
124
+ const bottom = det.getBoundingClientRect().top + full
125
+ const need = bottom + 16 - S.bottom
126
+ const room = top - 12 - S.top
127
+ const by = Math.min(need, room)
128
+ if (by > 0) sc.scrollBy({ top: by, behavior: reduced() ? 'auto' : 'smooth' })
129
+ }
130
+
131
+ // The open card and its row are one shape, drawn behind them: the card's sides curve out into the row, which pours
132
+ // down out of the card and spreads to the full width as it grows (liquid), or draws back in.
133
+ function shapePath (grid, card, det, t) {
134
+ const G = grid.getBoundingClientRect()
135
+ const C = card.getBoundingClientRect()
136
+ const D = det.getBoundingClientRect()
137
+ const r = 14
138
+ const x1 = C.left - G.left + 0.5
139
+ const x2 = C.right - G.left - 0.5
140
+ const y1 = C.top - G.top + 0.5
141
+ const cb = D.top - G.top
142
+ const B = D.bottom - G.top - 0.5
143
+ const L = D.left - G.left + 0.5
144
+ const W = D.right - G.left - 0.5
145
+ // It spreads as it falls: slowly at first (a stream out of the card), then out to both edges.
146
+ const tt = Math.min(1, Math.max(0, t))
147
+ const e = tt * tt * (3 - 2 * tt)
148
+ const PL = x1 + (L - x1) * e
149
+ const PR = x2 + (W - x2) * e
150
+ const h = Math.max(0, B - cb)
151
+ const rr = Math.min(r, h / 2)
152
+ const left = x1 - PL
153
+ const right = PR - x2
154
+ const fl = Math.min(22, left / 2, h)
155
+ const fr = Math.min(22, right / 2, h)
156
+ const tl = Math.min(rr, Math.max(0, left - fl))
157
+ const tr = Math.min(rr, Math.max(0, right - fr))
158
+ let d = `M ${x1 + r} ${y1} H ${x2 - r} A ${r} ${r} 0 0 1 ${x2} ${y1 + r}`
159
+ d += right < 1 ? ` V ${B - rr} A ${rr} ${rr} 0 0 1 ${x2 - rr} ${B}`
160
+ : ` V ${cb - fr} A ${fr} ${fr} 0 0 0 ${x2 + fr} ${cb} H ${PR - tr} A ${tr} ${tr} 0 0 1 ${PR} ${cb + tr} V ${B - rr} A ${rr} ${rr} 0 0 1 ${PR - rr} ${B}`
161
+ d += left < 1 ? ` H ${x1 + rr} A ${rr} ${rr} 0 0 1 ${x1} ${B - rr} V ${y1 + r}`
162
+ : ` H ${PL + rr} A ${rr} ${rr} 0 0 1 ${PL} ${B - rr} V ${cb + tl} A ${tl} ${tl} 0 0 1 ${PL + tl} ${cb} H ${x1 - fl} A ${fl} ${fl} 0 0 0 ${x1} ${cb - fl} V ${y1 + r}`
163
+ return `${d} A ${r} ${r} 0 0 1 ${x1 + r} ${y1} Z`
164
+ }
165
+ function drawShape (t = 1) {
166
+ const grid = root.querySelector('.kl-detail')?.parentElement
167
+ const det = grid && grid.querySelector('.kl-detail')
168
+ const card = grid && grid.querySelector('.kl-card.open')
169
+ if (!det || !card) return
170
+ let svg = grid.querySelector(':scope > .kl-shape')
171
+ if (!svg) { grid.insertAdjacentHTML('afterbegin', '<svg class="kl-shape" aria-hidden="true"><path/></svg>'); svg = grid.firstElementChild }
172
+ svg.firstElementChild.setAttribute('d', shapePath(grid, card, det, t))
173
+ }
174
+ // Pours the row in (its height from nothing to its own, spreading out of the card) or out, then calls `done`.
175
+ function pour (det, way, done = () => {}) {
176
+ const inner = det.firstElementChild
177
+ const full = inner.offsetHeight
178
+ if (way === 'in') bringIntoView(det, full)
179
+ const from = way === 'in' ? 0 : det.offsetHeight
180
+ const to = way === 'in' ? full : 0
181
+ const ms = way === 'in' ? 520 : 300
182
+ const start = performance.now()
183
+ let raf = 0
184
+ const ease = way === 'in' ? (x) => 1 - Math.pow(1 - x, 3) : (x) => x * x
185
+ const frame = (now) => {
186
+ const x = Math.min(1, (now - start) / ms)
187
+ const hgt = from + (to - from) * ease(x)
188
+ det.style.height = `${hgt}px`
189
+ inner.style.opacity = String(way === 'in' ? Math.max(0, (x - 0.35) / 0.65) : Math.max(0, 1 - x * 2))
190
+ drawShape(full ? hgt / full : 0)
191
+ if (x < 1) raf = requestAnimationFrame(frame)
192
+ else { det.style.height = ''; inner.style.opacity = ''; done() }
193
+ }
194
+ cancelAnimationFrame(raf)
195
+ raf = requestAnimationFrame(frame)
87
196
  }
88
197
 
89
198
  function callsHtml () {
@@ -128,7 +237,10 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
128
237
  if (opened && openApp_) {
129
238
  let end = opened
130
239
  while (end.nextElementSibling && end.nextElementSibling.offsetTop === opened.offsetTop) end = end.nextElementSibling
131
- end.insertAdjacentHTML('afterend', openRowHtml(openApp_, ownApps.has(openApp_.slug)))
240
+ end.insertAdjacentHTML('afterend', openRowHtml(openApp_))
241
+ const det = end.nextElementSibling
242
+ if (ui.pour === 'in' && !reduced()) { det.style.height = '0px'; det.firstElementChild.style.opacity = '0'; pour(det, 'in') } else drawShape(1)
243
+ ui.pour = null
132
244
  }
133
245
  if (had) { const s = root.querySelector('[data-search]'); s.focus(); s.setSelectionRange(s.value.length, s.value.length) }
134
246
  }
@@ -178,10 +290,10 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
178
290
  root.addEventListener('keydown', (e) => {
179
291
  const card = e.target.matches && e.target.matches('[data-open]') ? e.target : null
180
292
  if (card && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); openApp(card.dataset.open) }
181
- if (e.key === 'Escape' && ui.open) { ui.open = null; draw() }
293
+ if (e.key === 'Escape' && ui.open) closeApp()
182
294
  })
183
295
  // A resize moves cards between rows: the open one's row moves with it.
184
- const onResize = () => { if (ui.open) draw() }
296
+ const onResize = () => { if (ui.open) draw() } // the row moves under its card's new row, and the shape is redrawn
185
297
  window.addEventListener('resize', onResize)
186
298
 
187
299
  root.addEventListener('change', async (e) => {
@@ -214,7 +326,8 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
214
326
  load()
215
327
  return
216
328
  }
217
- if (e.target.closest('[data-close-open]')) { ui.open = null; draw(); return }
329
+ const more = e.target.closest('[data-more-actions]')
330
+ if (more) { const k = more.dataset.moreActions; if (ui.more.has(k)) ui.more.delete(k); else ui.more.add(k); draw(); return }
218
331
  const card = e.target.closest('[data-open]')
219
332
  if (card && !e.target.closest('button, a, input, label')) { openApp(card.dataset.open); return }
220
333
  const tab = e.target.closest('[data-group]')