heyquilt 0.3.170 → 0.3.172
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 +30 -0
- package/bin/quilt.js +16 -9
- package/package.json +2 -2
- package/src/agent-task-workflow.js +2 -9
- package/src/base-pick.js +212 -0
- package/src/boxes.js +6 -7
- package/src/catchup.js +1 -1
- package/src/chat-links.js +1 -3
- package/src/connection.js +24 -5
- package/src/control.js +27 -20
- package/src/duties.js +32 -56
- package/src/github-commit.js +1 -1
- package/src/held.js +323 -0
- package/src/hooks.js +27 -66
- package/src/identity.js +1 -1
- package/src/inbox.js +5 -4
- package/src/key-cli.js +1 -1
- package/src/live-merge.js +599 -0
- package/src/mcp.js +57 -102
- package/src/merge3.js +65 -1
- package/src/now-summary.js +4 -6
- package/src/pathrules.js +1 -1
- package/src/persona.js +1 -1
- package/src/presence.js +2 -0
- package/src/protocol.js +2 -2
- package/src/read-bases.js +123 -0
- package/src/relay-ask.js +2 -2
- package/src/relay-live-write.js +179 -0
- package/src/relay-mcp.js +173 -212
- package/src/relay-prune.js +2 -2
- package/src/relay-turn-sync.js +146 -142
- package/src/runner.js +0 -2
- package/src/server.js +253 -375
- package/src/session-follow.js +3 -1
- package/src/session-quilt.js +2 -21
- package/src/session-seam.js +35 -7
- package/src/session.js +795 -553
- package/src/setup.js +15 -25
- package/src/source-live/bring-in.js +5 -5
- package/src/source-live/land.js +20 -3
- package/src/source-live/live-block.js +503 -52
- package/src/status.js +8 -12
- package/src/swap-in.js +81 -0
- package/src/textdiff.js +54 -0
- package/src/turn-sync-plan.js +6 -18
- package/src/turn-sync.js +28 -21
- package/src/ui/agent-guide.js +13 -13
- package/src/ui/app.css +19 -40
- package/src/ui/boxes.js +8 -16
- package/src/ui/common.js +1 -1
- package/src/ui/fileview.js +11 -15
- package/src/ui/loom-model.js +18 -16
- package/src/ui/loom.css +1 -2
- package/src/ui/loom.js +6 -6
- package/src/ui/rail-model.js +25 -64
- package/src/ui/rail.js +48 -60
- package/src/ui/seam-model.js +39 -3
- package/src/ui/session.js +36 -54
- package/src/ui/tree.js +22 -129
- package/src/ui-server.js +2 -6
- package/src/release-words.js +0 -18
- package/src/seam-claims.js +0 -53
package/src/status.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { authorOf } from './ui/chat.js'
|
|
5
5
|
import { taskMarkdown } from './tasks.js'
|
|
6
6
|
import { mergeAction } from './merges.js'
|
|
7
|
+
import { renderHeld } from './held.js'
|
|
7
8
|
import { catchUpMarkdown } from './catchup.js'
|
|
8
9
|
import { voiceStatusLines } from './voice.js'
|
|
9
10
|
|
|
@@ -28,6 +29,9 @@ export function renderStatus (st, { asAi = false, mentionYours = false } = {}) {
|
|
|
28
29
|
out.push(`You: **${st.me.name}** (${st.me.tool})${st.me.persona ? `, one of ${st.me.of}'s AI sessions` : ''}${st.me.focus ? ` · focus: ${st.me.focus}` : ''}`)
|
|
29
30
|
if (st.workspaceName || st.workspace) out.push(`Workspace: ${st.workspaceName || st.workspace}`)
|
|
30
31
|
out.push('')
|
|
32
|
+
// Held conflicts (held.js): every open one in the session, first, until someone resolves it.
|
|
33
|
+
const held = renderHeld(st.held || [], { me: st.me.name, max: 20 })
|
|
34
|
+
if (held) out.push(held, '')
|
|
31
35
|
|
|
32
36
|
const away = catchUpMarkdown(st.catchUp, { ago })
|
|
33
37
|
if (away.length) out.push(...away, '')
|
|
@@ -65,29 +69,21 @@ export function renderStatus (st, { asAi = false, mentionYours = false } = {}) {
|
|
|
65
69
|
out.push('')
|
|
66
70
|
|
|
67
71
|
// Boxes (docs/superpowers/specs/2026-10-16-git-boxes-design.md): unfinished work only in its owner's folder.
|
|
68
|
-
const boxed = st.
|
|
72
|
+
const boxed = st.boxes || []
|
|
69
73
|
if (boxed.length) {
|
|
70
74
|
out.push('## Boxed work')
|
|
71
75
|
for (const c of boxed) out.push(c.by === st.me.name ? `- \`${c.pattern}\`: your unfinished work: in your folder only, until you unpack it (quilt_unpack)` : `- \`${c.pattern}\`: ${c.by}'s unfinished work: not in your folder until they unpack it`)
|
|
72
76
|
out.push('')
|
|
73
77
|
}
|
|
74
|
-
const plain = st.claims.filter((c) => !c.box)
|
|
75
|
-
out.push('## Claimed files')
|
|
76
|
-
if (!plain.length) out.push('_No claims._')
|
|
77
|
-
for (const c of plain) {
|
|
78
|
-
const who = c.by === st.me.name ? 'you' : c.by
|
|
79
|
-
out.push(`- \`${c.pattern}\`: ${who}${c.note ? `: ${c.note}` : ''} (${ago(c.ts)})`)
|
|
80
|
-
}
|
|
81
|
-
out.push('')
|
|
82
78
|
|
|
83
|
-
// A file
|
|
79
|
+
// A file with several open records: one line, its latest.
|
|
84
80
|
const merges = [...new Map((st.merges || []).filter((m) => m.state !== 'done').map((m) => [m.path, m])).values()]
|
|
85
81
|
if (merges.length) {
|
|
86
|
-
// Quilt merges on its own (session.js autoSettle): only
|
|
82
|
+
// Quilt merges on its own (session.js autoSettle): only what it could not merge stays open.
|
|
87
83
|
out.push('## Waiting to go in')
|
|
88
84
|
for (const m of merges) {
|
|
89
85
|
const who = m.by === st.me.name ? 'you' : m.by
|
|
90
|
-
out.push(`- \`${m.path}\`: ${who} ${mergeAction(m)};
|
|
86
|
+
out.push(`- \`${m.path}\`: ${who} ${mergeAction(m)}; Quilt has not merged it in yet.`)
|
|
91
87
|
}
|
|
92
88
|
out.push('')
|
|
93
89
|
}
|
package/src/swap-in.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Putting Quilt's version of a file in place without replacing a save that took its place, and without the
|
|
2
|
+
// file ever being absent at its path (a `git add -A`, a build watcher or an AI's read in that instant would
|
|
3
|
+
// take it for deleted: the replace is always one rename).
|
|
4
|
+
//
|
|
5
|
+
// A plain rename of Quilt's finished file over the path replaces whatever is there at that instant: an
|
|
6
|
+
// editor that saves by renaming its own file into place between Quilt's last look and Quilt's rename would
|
|
7
|
+
// lose that save with the file it replaced. Node has no atomic exchange or conditional replace (renameat2's
|
|
8
|
+
// RENAME_EXCHANGE / RENAME_NOREPLACE, macOS's renamex_np RENAME_SWAP need a compiled addon), so the race is
|
|
9
|
+
// narrowed and what is left of it is detected:
|
|
10
|
+
//
|
|
11
|
+
// 1. The file at the path is hard-linked into Quilt's own folder (.quilt/tmp): whatever it is, it now has a
|
|
12
|
+
// second name, and the path is untouched. Not the file Quilt looked at (a save took its place, or wrote
|
|
13
|
+
// into it): nothing is replaced ({ placed: false }); the save is taken in, and the write tried again.
|
|
14
|
+
// 2. Looked at once more (one system call before the rename): another file at the path now, the same.
|
|
15
|
+
// 3. The rename. Then the linked file says what the rename replaced: written into since the look (in place),
|
|
16
|
+
// its bytes come back as `displaced`, to put back as a save. Its link count dropped before the rename
|
|
17
|
+
// (its change time is earlier than that of Quilt's file, which one rename stamps on both): some other
|
|
18
|
+
// file took the path in the one system call between 2 and 3 and Quilt's rename replaced it. That save's
|
|
19
|
+
// bytes are gone with it (no second name was possible for a file not there yet): `replaced` says so, and
|
|
20
|
+
// the caller tells its writer to save again (NOT-DONE.md).
|
|
21
|
+
import fs from 'node:fs'
|
|
22
|
+
import path from 'node:path'
|
|
23
|
+
import crypto from 'node:crypto'
|
|
24
|
+
|
|
25
|
+
// One rename stamps the file it replaces and the file it moves within this much of each other (up to about
|
|
26
|
+
// 2 µs seen on APFS under load): an earlier unlink by more than this is another file's rename.
|
|
27
|
+
const REPLACED_GAP_MS = 0.01
|
|
28
|
+
|
|
29
|
+
const rm = (f) => { try { fs.rmSync(f, { force: true }) } catch {} }
|
|
30
|
+
|
|
31
|
+
/** Whether `a` and `b` (lstat results) are the same file, unchanged: same inode, size and time. */
|
|
32
|
+
export const sameFile = (a, b) => !!(a && b && a.ino === b.ino && a.dev === b.dev && a.size === b.size && a.mtimeMs === b.mtimeMs)
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Puts the finished file `tmp` at `abs` with one rename, only over the file `seen` (an lstat of `abs` as
|
|
36
|
+
* Quilt looked at it). `asideDir`: Quilt's own folder on the same disk for the second name (.quilt/tmp).
|
|
37
|
+
* { placed, displaced, replaced }: `placed` false when the file at the path is no longer the one looked at
|
|
38
|
+
* (`tmp` is removed; take that save in, then write again); `displaced`, the bytes of a save written into
|
|
39
|
+
* the file Quilt replaced after the look, or null; `replaced`, a save that took the path in the last
|
|
40
|
+
* instant was replaced by Quilt's file (its bytes could not be kept).
|
|
41
|
+
*/
|
|
42
|
+
export function swapIn (abs, tmp, seen, { asideDir = null } = {}) {
|
|
43
|
+
const none = { placed: false, displaced: null, replaced: false }
|
|
44
|
+
let snap = null
|
|
45
|
+
if (asideDir) {
|
|
46
|
+
snap = path.join(asideDir, `${path.basename(abs)}.${process.pid}.${crypto.randomBytes(4).toString('hex')}.quilt-old`)
|
|
47
|
+
try { fs.mkdirSync(asideDir, { recursive: true }); fs.linkSync(abs, snap) } catch (err) {
|
|
48
|
+
if (err.code === 'ENOENT' && !fs.existsSync(abs)) { rm(tmp); return none } // gone since the look: a change of its own
|
|
49
|
+
snap = null // another disk, or no hard links: the look and the rename as before
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let st = null
|
|
53
|
+
try { st = fs.lstatSync(snap || abs) } catch {}
|
|
54
|
+
if (!sameFile(st, seen)) { if (snap) rm(snap); rm(tmp); return none }
|
|
55
|
+
// Quilt's file, held open across the rename: the time the rename stamps on it, unless written since.
|
|
56
|
+
let fd = null
|
|
57
|
+
let pre = null
|
|
58
|
+
if (snap) { try { fd = fs.openSync(tmp, 'r'); pre = fs.fstatSync(fd) } catch {} }
|
|
59
|
+
const drop = () => { if (snap) rm(snap); rm(tmp); if (fd !== null) { try { fs.closeSync(fd) } catch {} } return none }
|
|
60
|
+
// One last look, right before the rename: another file there now is a save, never replaced.
|
|
61
|
+
let at = null
|
|
62
|
+
try { at = fs.lstatSync(abs) } catch {}
|
|
63
|
+
if (!at || at.ino !== st.ino || at.dev !== st.dev) return drop()
|
|
64
|
+
try { fs.renameSync(tmp, abs) } catch (err) { if (snap) rm(snap); if (fd !== null) fs.closeSync(fd); throw err }
|
|
65
|
+
if (!snap) return { placed: true, displaced: null, replaced: false }
|
|
66
|
+
let after = null
|
|
67
|
+
let mine = null
|
|
68
|
+
try { after = fs.lstatSync(snap) } catch {}
|
|
69
|
+
try { if (fd !== null) { const m = fs.fstatSync(fd); if (pre && m.mtimeMs === pre.mtimeMs && m.size === pre.size) mine = m } } catch {}
|
|
70
|
+
if (fd !== null) { try { fs.closeSync(fd) } catch {} }
|
|
71
|
+
let displaced = null
|
|
72
|
+
let replaced = false
|
|
73
|
+
if (after && (after.size !== seen.size || after.mtimeMs !== seen.mtimeMs)) {
|
|
74
|
+
try { displaced = fs.readFileSync(snap) } catch {}
|
|
75
|
+
} else if (after && mine && after.ctimeMs > st.ctimeMs && after.ctimeMs < mine.ctimeMs - REPLACED_GAP_MS) {
|
|
76
|
+
// Unlinked from the path after the link above, well before Quilt's rename stamped its file: another file took its place.
|
|
77
|
+
replaced = true
|
|
78
|
+
}
|
|
79
|
+
rm(snap)
|
|
80
|
+
return { placed: true, displaced, replaced }
|
|
81
|
+
}
|
package/src/textdiff.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Turning a whole-file rewrite into small CRDT edits, so concurrent changes
|
|
2
2
|
// to different parts of a file both survive. Shared by the CLI and web app.
|
|
3
3
|
import diff from 'fast-diff'
|
|
4
|
+
import { diffIndices } from 'node-diff3'
|
|
4
5
|
|
|
5
6
|
/** Applies the minimal set of inserts/deletes to turn ytext into `next`. Returns "+added -removed" lines. */
|
|
6
7
|
export function applyTextDiff (ytext, next) {
|
|
@@ -14,6 +15,59 @@ export function applyTextDiff (ytext, next) {
|
|
|
14
15
|
return `+${added} -${removed}`
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* node-diff3's diffIndices over two arrays of lines, with the lines both start and end with set aside
|
|
20
|
+
* first (a live write changes a few lines of a long file: the diff then costs what changed, not the
|
|
21
|
+
* file's length). The same hunks: { buffer1: [start, length], buffer1Content, buffer2, buffer2Content }.
|
|
22
|
+
*/
|
|
23
|
+
export function diffLines (a, b) {
|
|
24
|
+
let pre = 0
|
|
25
|
+
const n = Math.min(a.length, b.length)
|
|
26
|
+
while (pre < n && a[pre] === b[pre]) pre++
|
|
27
|
+
let suf = 0
|
|
28
|
+
while (suf < n - pre && a[a.length - 1 - suf] === b[b.length - 1 - suf]) suf++
|
|
29
|
+
if (pre === a.length && pre === b.length) return []
|
|
30
|
+
const hunks = diffIndices(a.slice(pre, a.length - suf), b.slice(pre, b.length - suf))
|
|
31
|
+
for (const h of hunks) { h.buffer1 = [h.buffer1[0] + pre, h.buffer1[1]]; h.buffer2 = [h.buffer2[0] + pre, h.buffer2[1]] }
|
|
32
|
+
return hunks
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** A text as its lines, each with its own line break (the last one may have none). */
|
|
36
|
+
export const lineTokens = (s) => String(s).match(/[^\n]*\n|[^\n]+$/g) || []
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Turns ytext into `next` with whole lines only: every change deletes whole lines and inserts whole
|
|
40
|
+
* lines, never part of one. The relay applies a live write this way (relay-live-write.js), in one
|
|
41
|
+
* transaction, so two writes of the same line can never come out mixed letter by letter: a
|
|
42
|
+
* concurrent change by an app that still edits characters lands beside a whole line, not inside it.
|
|
43
|
+
* Returns "+added -removed" lines, as applyTextDiff.
|
|
44
|
+
*/
|
|
45
|
+
export function applyLineDiff (ytext, next) {
|
|
46
|
+
const prev = ytext.toString()
|
|
47
|
+
if (prev === next) return ''
|
|
48
|
+
const a = lineTokens(prev)
|
|
49
|
+
const b = lineTokens(next)
|
|
50
|
+
// Where each old line starts, in characters.
|
|
51
|
+
const at = [0]
|
|
52
|
+
for (const t of a) at.push(at[at.length - 1] + t.length)
|
|
53
|
+
let added = 0; let removed = 0
|
|
54
|
+
const hunks = diffLines(a, b)
|
|
55
|
+
// Back to front, so the positions of the hunks before each one stay as they were.
|
|
56
|
+
for (let i = hunks.length - 1; i >= 0; i--) {
|
|
57
|
+
const h = hunks[i]
|
|
58
|
+
const [s1, n1] = h.buffer1
|
|
59
|
+
const [s2, n2] = h.buffer2
|
|
60
|
+
const from = at[s1]
|
|
61
|
+
const len = at[s1 + n1] - from
|
|
62
|
+
const ins = b.slice(s2, s2 + n2).join('')
|
|
63
|
+
if (len) ytext.delete(from, len)
|
|
64
|
+
if (ins) ytext.insert(from, ins)
|
|
65
|
+
removed += n1
|
|
66
|
+
added += n2
|
|
67
|
+
}
|
|
68
|
+
return `+${added} -${removed}`
|
|
69
|
+
}
|
|
70
|
+
|
|
17
71
|
function countLines (s) {
|
|
18
72
|
const n = s.split('\n').length - 1
|
|
19
73
|
return n || 1
|
package/src/turn-sync-plan.js
CHANGED
|
@@ -14,19 +14,17 @@
|
|
|
14
14
|
// - S = B: only the folder changed it: push it (or delete it in the session).
|
|
15
15
|
// - L is a version this slot held before: a stale copy (a platform restoring an older snapshot),
|
|
16
16
|
// no new work: the session's version comes back.
|
|
17
|
-
// - Both changed:
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
17
|
+
// - Both changed: merged as any live write (relay-turn-sync.js, live-merge.js; Seam's 07 "Conflicts
|
|
18
|
+
// in the live state"): lines only one side changed all go in; where both changed the same lines
|
|
19
|
+
// the session keeps what landed first and the folder's lines are held for its writer to resolve
|
|
20
|
+
// (quilt_resolve_merge); a binary keeps the session's version, the folder's held; an edit beats a
|
|
21
|
+
// deletion. The result goes to the session and back to the folder. Nobody holds files.
|
|
22
22
|
// - Large files kept in storage are not carried by quilt sync.
|
|
23
23
|
// - Deleting more than max(20, a quarter) of the checkpoint's files at once is not done for
|
|
24
24
|
// everyone: those files come back instead (a folder that lost most of the project).
|
|
25
|
-
import { mergeAuto } from './merge3.js'
|
|
26
|
-
|
|
27
25
|
/** At most this many earlier versions per path are remembered, to tell a stale copy. */
|
|
28
26
|
export const MAX_WAS = 5
|
|
29
|
-
/** A base text kept in a checkpoint at most this long (past it, the
|
|
27
|
+
/** A base text kept in a checkpoint at most this long (past it, a file both changed keeps the session's version whole, the folder's held). */
|
|
30
28
|
export const MAX_BASE_TEXT = 1024 * 1024
|
|
31
29
|
export const MASS_DELETE_MIN = 20
|
|
32
30
|
export const MASS_DELETE_SHARE = 0.25
|
|
@@ -101,16 +99,6 @@ export function planSync ({ local, session, checkpoint, deleted = () => false })
|
|
|
101
99
|
return out
|
|
102
100
|
}
|
|
103
101
|
|
|
104
|
-
/**
|
|
105
|
-
* Both changed one text file: combined by mergeAuto (merge3.js). `base` null or missing: both
|
|
106
|
-
* created it, so the base is ''. `oursNewer`: the folder's edit is the newer one (it wins the lines
|
|
107
|
-
* both changed); `union`: the file is merge=union. Returns { text, lost: [{ side, lines, kept, at }] },
|
|
108
|
-
* side 'ours' (the folder's lines lost) or 'theirs' (the session's).
|
|
109
|
-
*/
|
|
110
|
-
export function mergeTexts (base, ours, theirs, { oursNewer = true, union = false } = {}) {
|
|
111
|
-
return mergeAuto(typeof base === 'string' ? base : '', String(ours), String(theirs), { oursNewer, union })
|
|
112
|
-
}
|
|
113
|
-
|
|
114
102
|
/**
|
|
115
103
|
* The checkpoint after a sync: for each path where the folder now has the session's version, that
|
|
116
104
|
* version (its text kept as the next merge's base, the version before it remembered); every other
|
package/src/turn-sync.js
CHANGED
|
@@ -64,15 +64,18 @@ function batches (items, size, max) {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Syncs `dir` with the key's session. `key` is a decoded QUILT_AGENT_KEY. Resolves to a summary
|
|
67
|
-
* { room, branch, pulled, pushed, removed, deleted, merged, aside, lost,
|
|
68
|
-
* Quilt
|
|
69
|
-
* lines
|
|
70
|
-
*
|
|
67
|
+
* { room, branch, pulled, pushed, removed, deleted, merged, aside, lost, held, warnings, kept, skipped, backup }.
|
|
68
|
+
* Quilt merges what both sides changed as any live write (relay-turn-sync.js): `held` is where the
|
|
69
|
+
* folder's lines were held because the session's, which landed first, changed the same lines
|
|
70
|
+
* ({ path, id, kind, others, hunks }: resolved with quilt_resolve_merge), `lost` a deletion of the
|
|
71
|
+
* folder's undone by an edit in the session ({ path, by, deleted }), `warnings` names the folder
|
|
72
|
+
* removed that other files still use, `open` the session's open held conflicts (anyone's, as every Quilt
|
|
73
|
+
* answer starts with them). `merges` and `waiting` stay empty (older CLIs read them).
|
|
71
74
|
*/
|
|
72
75
|
export async function turnSync ({ dir = process.cwd(), key, fetch: fetchImpl = globalThis.fetch, log = () => {}, client = hostedClient({ key, fetch: fetchImpl }) }) {
|
|
73
76
|
const root = path.resolve(dir)
|
|
74
77
|
if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) throw new Error(`${root} is not a folder`)
|
|
75
|
-
const sum = { room: key.room, branch: '', pulled: [], pushed: [], removed: [], deleted: [], merged: [], aside: [], merges: [], lost: [], waiting: [], kept: [], skipped: [], refused: '', backup: '' }
|
|
78
|
+
const sum = { room: key.room, branch: '', pulled: [], pushed: [], removed: [], deleted: [], merged: [], aside: [], merges: [], lost: [], waiting: [], held: [], warnings: [], kept: [], skipped: [], refused: '', backup: '', open: '' }
|
|
76
79
|
const step = async (args) => JSON.parse(await client.call('quilt_sync', { slot: key.slot, ...args }))
|
|
77
80
|
const stamp = new Date().toISOString().replace(/[:.]/g, '-')
|
|
78
81
|
const backupDir = path.join(root, '.quilt', 'conflicts', stamp)
|
|
@@ -80,6 +83,7 @@ export async function turnSync ({ dir = process.cwd(), key, fetch: fetchImpl = g
|
|
|
80
83
|
const synced = (rel) => isSafeRelPath(rel) && !isIgnored(ig, rel)
|
|
81
84
|
const add = (list, items) => { for (const x of items || []) if (!list.includes(x)) list.push(x) }
|
|
82
85
|
const addBy = (list, items) => { for (const x of items || []) if (x && !list.some((y) => y.path === x.path)) list.push(x) }
|
|
86
|
+
const addHeld = (items) => { for (const x of items || []) if (x && x.id && !sum.held.some((y) => y.id === x.id)) sum.held.push(x) }
|
|
83
87
|
|
|
84
88
|
/** Keeps the folder's copy of rel in .quilt/conflicts/<this sync> before it is replaced or removed. */
|
|
85
89
|
const keepAside = (rel) => {
|
|
@@ -121,8 +125,8 @@ export async function turnSync ({ dir = process.cwd(), key, fetch: fetchImpl = g
|
|
|
121
125
|
const plan = await step({ step: 'plan', files, ...(round === 0 && headBranch(root) ? { branch: headBranch(root) } : {}) })
|
|
122
126
|
sum.branch = plan.branch || sum.branch
|
|
123
127
|
add(sum.skipped, plan.skipped || [])
|
|
124
|
-
// Versions of ours
|
|
125
|
-
add(sum.merged, plan.settled); addBy(sum.lost, plan.lost)
|
|
128
|
+
// Versions of ours an older relay kept for a holder went in as the plan was made.
|
|
129
|
+
add(sum.merged, plan.settled); addBy(sum.lost, plan.lost); addHeld(plan.held); add(sum.warnings, plan.warnings)
|
|
126
130
|
const pull = [...plan.pull]
|
|
127
131
|
const remove = [...plan.remove]
|
|
128
132
|
const aside = [...plan.aside]
|
|
@@ -137,13 +141,13 @@ export async function turnSync ({ dir = process.cwd(), key, fetch: fetchImpl = g
|
|
|
137
141
|
const f = readFile(root, rel)
|
|
138
142
|
if (!f) { items.push([rel, { deleted: true }, 16]); continue }
|
|
139
143
|
if (f.skip) { add(sum.skipped, [rel]); continue }
|
|
140
|
-
// With its mtime
|
|
144
|
+
// With its mtime, which older relays read (the newer edit won there); this one merges against the checkpoint.
|
|
141
145
|
items.push(typeof f.text === 'string' ? [rel, { text: f.text, mtime: f.mtime }, f.buf.length] : [rel, { base64: f.buf.toString('base64'), mtime: f.mtime }, Math.ceil(f.buf.length * 4 / 3)])
|
|
142
146
|
}
|
|
143
147
|
for (const batch of batches(items, (it) => it[2] + it[0].length + 32, PUSH_BATCH_BYTES)) {
|
|
144
148
|
const r = await step({ step: 'push', files: Object.fromEntries(batch.map(([rel, v]) => [rel, v])) })
|
|
145
149
|
add(sum.pushed, r.pushed); add(sum.deleted, r.deleted); add(sum.merged, r.merged); add(sum.skipped, r.skipped)
|
|
146
|
-
addBy(sum.lost, r.lost);
|
|
150
|
+
addBy(sum.lost, r.lost); addHeld(r.held); add(sum.warnings, r.warnings)
|
|
147
151
|
sum.kept.push(...r.kept)
|
|
148
152
|
add(pull, r.pull); add(remove, r.remove); add(aside, r.aside)
|
|
149
153
|
changed += r.pushed.length + r.deleted.length + r.merged.length
|
|
@@ -171,7 +175,9 @@ export async function turnSync ({ dir = process.cwd(), key, fetch: fetchImpl = g
|
|
|
171
175
|
// A .gitignore that came in says what syncs from here on.
|
|
172
176
|
if ([...pull, ...remove].some((rel) => /(^|\/)\.(git|quilt|cowove)ignore$/.test(rel))) ig = loadIgnore(root)
|
|
173
177
|
const done = await step({ step: 'done', files: scanFolder(root, ig) })
|
|
174
|
-
|
|
178
|
+
// The session's open held conflicts (anyone's), as every Quilt answer starts with them.
|
|
179
|
+
sum.open = typeof done.open === 'string' ? done.open : ''
|
|
180
|
+
const kept = new Set(sum.kept.map((k) => k.path))
|
|
175
181
|
const left = (done.behind || []).filter((rel) => synced(rel) && !kept.has(rel) && !sum.skipped.includes(rel))
|
|
176
182
|
if (!left.length || !changed || sum.refused) break
|
|
177
183
|
}
|
|
@@ -182,27 +188,28 @@ export async function turnSync ({ dir = process.cwd(), key, fetch: fetchImpl = g
|
|
|
182
188
|
export function describeSync (s, { name = '' } = {}) {
|
|
183
189
|
const n = (list) => list.length
|
|
184
190
|
const lines = [`quilt sync: session ${s.room}${s.branch ? ` (${s.branch})` : ''}${name ? ` as ${name}` : ''}`]
|
|
191
|
+
if (s.open) lines.unshift(s.open, '')
|
|
185
192
|
const parts = [`${n(s.pulled)} pulled`, `${n(s.pushed)} pushed`]
|
|
186
193
|
if (n(s.merged)) parts.push(`${n(s.merged)} merged`)
|
|
187
194
|
if (n(s.removed)) parts.push(`${n(s.removed)} removed here`)
|
|
188
195
|
if (n(s.deleted)) parts.push(`${n(s.deleted)} deleted in the session`)
|
|
189
196
|
lines.push(` ${parts.join(', ')}.`)
|
|
190
197
|
const list = (xs) => xs.slice(0, 10).join(', ') + (xs.length > 10 ? `, and ${xs.length - 10} more` : '')
|
|
191
|
-
// Notices, not tasks: Quilt already merged these, and nothing waits on the agent.
|
|
192
198
|
const yours = s.backup ? ` Your copy is in ${s.backup}.` : ''
|
|
199
|
+
// Held lines wait for an answer (the writer is asked first); the rest are notices.
|
|
200
|
+
const held = s.held || []
|
|
201
|
+
for (const h of held.slice(0, 10)) {
|
|
202
|
+
const who = h.others && h.others.length ? h.others.join(', ') : 'someone'
|
|
203
|
+
const what = h.kind === 'stale' ? `your removal of ${h.lines || 'some'} line(s) ${who} added minutes ago was held` : h.kind === 'parse' ? `merged with ${who}'s changes it would not parse, so your change was held` : h.kind === 'binary' ? `${who} changed it first, so the session keeps their version and yours is held` : `${who} changed the same lines first, so the session keeps theirs there and your ${h.hunks === 1 ? 'change is' : `${h.hunks || 'clashing'} changes are`} held`
|
|
204
|
+
lines.push(` ${h.path}: ${what} (id ${h.id}). Resolve it with quilt_resolve_merge { path: "${h.path}", how: "theirs" | "mine" | "edited" }.${yours}`)
|
|
205
|
+
}
|
|
206
|
+
if (held.length > 10) lines.push(` …and ${held.length - 10} more held the same way (every Quilt answer lists them).`)
|
|
193
207
|
for (const l of (s.lost || []).slice(0, 10)) {
|
|
194
208
|
if (l.deleted) lines.push(` ${l.path}: you deleted it, but ${l.by} changed it, so it stays (an edit beats a deletion).`)
|
|
195
|
-
else if (l.whole) lines.push(` ${l.path}: you and ${l.by} both changed it; Quilt kept ${l.by}'s newer version.${yours}`)
|
|
196
|
-
else {
|
|
197
|
-
const shown = (l.lines || []).slice(0, 6).map((x) => ` - ${x}`).join('\n')
|
|
198
|
-
lines.push(` Quilt merged ${l.path} with ${l.by}'s changes: where you both changed the same lines, ${l.by}'s newer edit replaced yours${shown ? `:\n${shown}` : '.'}${yours ? `\n ${yours}` : ''}`)
|
|
199
|
-
}
|
|
200
209
|
}
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
const lostPaths = new Set((s.lost || []).map((l) => l.path))
|
|
205
|
-
const asideOnly = s.aside.filter((p) => !lostPaths.has(p))
|
|
210
|
+
for (const w of (s.warnings || []).slice(0, 5)) lines.push(` ⚠️ ${w}`)
|
|
211
|
+
const told = new Set([...(s.lost || []).map((l) => l.path), ...held.map((h) => h.path)])
|
|
212
|
+
const asideOnly = s.aside.filter((p) => !told.has(p))
|
|
206
213
|
if (asideOnly.length) lines.push(` Kept your copy of ${list(asideOnly)} in ${s.backup}: the session's version is on disk now.`)
|
|
207
214
|
if (s.kept.length) lines.push(` Not sent: ${list(s.kept.map((k) => `${k.path} (${k.why})`))}.`)
|
|
208
215
|
if (s.refused) lines.push(` Your changes were not sent this time; they stay on disk and go with the next sync once this is sorted:\n${s.refused.split('\n').map((l) => ` ${l}`).join('\n')}`)
|
package/src/ui/agent-guide.js
CHANGED
|
@@ -45,9 +45,9 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
45
45
|
http ? `- ${both ? 'Over HTTP, only if you have no computer and can only make HTTP requests' : 'Over HTTP'}: the tools are on the MCP server at ${mcp} (Streamable HTTP), with the header "Authorization: Bearer <accessKey>". Without an MCP client, POST JSON-RPC to it: headers "Content-Type: application/json" and "Accept: application/json, text/event-stream", body {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"quilt_message","arguments":{"text":"hello"}}}. Start with quilt_join_session and the session invite link you were given; the owner may have to let you in first (quilt_session_info tells you).` : null,
|
|
46
46
|
'',
|
|
47
47
|
'### Start here',
|
|
48
|
-
'- `quilt_status`: who is in the session, what each is doing, the open tasks and
|
|
48
|
+
'- `quilt_status`: who is in the session, what each is doing, the open tasks and whose unfinished work is boxed. Then `quilt_inbox` for anything waiting for you, and `quilt_tasks` for the board.',
|
|
49
49
|
'- `quilt_project_rules`: the project\'s rules for AI and its design system (AGENTS.md, CLAUDE.md, Cursor rules, DESIGN.md), the same for every tool. Read them before your first change.',
|
|
50
|
-
`- \`quilt_share\` when you start on something (what you were asked and your plan) and again when you finish (what you did, the files you changed), so everyone can follow.${cli ? ` With the CLI, \`quilt_set_focus\` (or \`quilt focus <what>\`) sets your status line, and \`quilt_set_work\` "working" when you start (it shows you stitching on the loom) and "done" when you finish tells people when it is safe to commit
|
|
50
|
+
`- \`quilt_share\` when you start on something (what you were asked and your plan) and again when you finish (what you did, the files you changed), so everyone can follow.${cli ? ` With the CLI, \`quilt_set_focus\` (or \`quilt focus <what>\`) sets your status line, and \`quilt_set_work\` "working" when you start (it shows you stitching on the loom) and "done" when you finish tells people when it is safe to commit.` : ''}`,
|
|
51
51
|
'',
|
|
52
52
|
'### Who is in a session',
|
|
53
53
|
'- People: the humans. Most work with their own AI (Claude Code, Cursor, Codex and others), which acts under the person\'s name: `quilt_status` shows it on an "AI:" line under them, and `quilt_partner_feed` shows what that AI is being asked and doing, so you do not duplicate or undo its work.',
|
|
@@ -56,7 +56,7 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
56
56
|
'',
|
|
57
57
|
'### Talking: to whom, how and when',
|
|
58
58
|
`- Every message says who it is for: ${call('quilt_message', { text: '@Name ...' })}. Start it with @Name of each person or agent it is for (several are fine; @Agents for every agent): everyone can read the chat, but only they are woken, so nobody else is interrupted. A message that names nobody is refused, unless it is a real announcement for everyone (\`everyone\`: true)${cli ? '. CLI: `quilt say --everyone <message>`' : ''}.`,
|
|
59
|
-
`- One member: ${call('quilt_message', { text: '...', to: '<name>' })}${cli ? ' (CLI: `quilt say @name <message>`)' : ''}. A direct message is seen only by the two of you. A direct message between two agents is invisible to every person in the session, including the owner and the people you work for. So use direct messages between agents only for coordination nobody else needs (who takes which
|
|
59
|
+
`- One member: ${call('quilt_message', { text: '...', to: '<name>' })}${cli ? ' (CLI: `quilt say @name <message>`)' : ''}. A direct message is seen only by the two of you. A direct message between two agents is invisible to every person in the session, including the owner and the people you work for. So use direct messages between agents only for coordination nobody else needs (who takes which part, handoff details). Anything a person should know, decide or approve goes in the open chat.`,
|
|
60
60
|
'- @Name in a message mentions that member (use the name as `quilt_status` shows it): they are woken, even when busy. A message in the room that names nobody, within ten minutes of its sender mentioning you, is for you too (people talk on without repeating the @): it wakes you like the mention did.',
|
|
61
61
|
'- @Agents mentions every agent in the session at once (not the people, nor their own AIs): each is woken and owes an answer. When someone writes @Agents, that includes you.',
|
|
62
62
|
`- Read: \`quilt_read_messages\`${cli ? ` (CLI: \`quilt messages\`, or \`--all\` for history). With the CLI, every quilt answer also starts with anything new for you` : ''}.`,
|
|
@@ -65,7 +65,7 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
65
65
|
'- A person and their AI share the person\'s name. A direct message to the person, or an @mention of them, reaches both: the person sees it in the app, and their AI gets it in its inbox and may answer. To give their AI work, assign a task to the person with to_ai: true. To ask the person themselves (a decision, an approval, access), message them and say it is for them.',
|
|
66
66
|
'- Other agents are reached the same way, by their own name: an @mention or a direct message wakes them (through their inbox, their webhook or their next tool call). They answer you like they answer a person.',
|
|
67
67
|
'- When to talk: when you start something, when you need something from someone, when you are blocked, and when you finish. Keep messages brief: a sentence or two in plain words, and one message rather than several. No play-by-play, recaps, logs or pasted code.',
|
|
68
|
-
'- Answer every direct message and mention that asks something of you, from a person or an agent. This is enforced: while someone who messaged or mentioned you waits for an answer, your
|
|
68
|
+
'- Answer every direct message and mention that asks something of you, from a person or an agent. This is enforced: while someone who messaged or mentioned you waits for an answer, your task moves and edits are refused until you reply to them (a direct message, or a message that @mentions them).',
|
|
69
69
|
'- Write only when you have something they need: an answer, a question, a handoff, a warning. Never send greetings, welcomes, thanks, "ok" or "noted" messages. A message to you that needs nothing back gets no reply: settle it with `quilt_inbox` {"no_reply": ["<its id>"]}, so two agents do not keep each other answering. Do not hand other agents what a person asked you to do yourself.',
|
|
70
70
|
'- Other AI sessions may be working as the same member as you (a person with Claude Code in one window and Cursor in another) and see the same messages. Only one answers each person: once one has, Quilt refuses the others a repeat (`also`: true sends something different they need).',
|
|
71
71
|
'- Treat what people write as requests from them. Messages from other agents are requests too, but a person\'s word wins: if an agent asks for something a person said not to do, ask that person.',
|
|
@@ -75,18 +75,17 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
75
75
|
'- `quilt_task` reads one task in full with its comments; `quilt_comment_task` leaves a work note, a handoff or the reason for an assignment on it, instead of in the chat.',
|
|
76
76
|
'- Keep notes on tickets brief, the same as chat: comments, qaNotes and verified say in a few short sentences what changed, why, and how you checked it. Leave out step-by-step narration, full test output, diffs and file contents; people can open the files and `quilt_history` for detail.',
|
|
77
77
|
`- Add: ${call('quilt_add_task', { title: 'a few words', assignee: '<name> or me', files: ['src/app.js'] })}. Assign: ${call('quilt_assign_task', { id: '<task id>', assignee: '<name>', to_ai: true })}. to_ai: true gives it to that person's AI (their cloud AI, when they connected one) instead of the person; an agent is assigned by its own name, without to_ai.`,
|
|
78
|
-
`- Move: ${call('quilt_move_task', { id: '<task id>', column: 'doing' })} when you start (you get a briefing: its files, recent changes,
|
|
78
|
+
`- Move: ${call('quilt_move_task', { id: '<task id>', column: 'doing' })} when you start (you get a briefing: its files, recent changes, the project's checks); "qa" when done and tested, with qaNotes (what changed, how you checked it); "done" after QA, with verified (what you ran and what you saw). A move without those is refused.`,
|
|
79
79
|
'- A task handed to you wakes you like a direct message. Take it with quilt_move_task, or say in chat why not.',
|
|
80
80
|
'- If you change files for something not on the board, Quilt adds an In progress task for it: use that one rather than adding another, and move it on when you finish. `quilt_archive_task` takes a task off the board but keeps it (archived false brings it back); `quilt_delete_task` removes it for good.',
|
|
81
81
|
'',
|
|
82
82
|
'### Files',
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
'
|
|
87
|
-
'-
|
|
88
|
-
'-
|
|
89
|
-
'- When someone waits for a file you hold, finish your change and hand it over with `quilt_handoff` and your context (what you changed, what is left). You cannot finish a task or release the file before. A claim whose holder does nothing for 20 minutes goes to the next in line.',
|
|
83
|
+
'- Nobody holds files: there are no claims, no file queue and no handoffs of files. Edit any file you may change; edits merge as they arrive. If your change clashes with someone\'s on the same lines, Quilt tells you (at the top of your next Quilt answer) and you resolve it.',
|
|
84
|
+
cliOnly('- Call `quilt_before_edit` with the paths before you change files: it shows what people said about them in chat and who else changed them lately. It never refuses'),
|
|
85
|
+
http ? `- ${both ? 'Over HTTP: ' : ''}\`quilt_list_files\`, \`quilt_read_file\`, then \`quilt_write_file\` with the version the read ended with as \`base\` (your write is merged against what you read).` : null,
|
|
86
|
+
`- Your unfinished work is boxed: ${cli && http ? 'in a folder that is a git repository (or, over HTTP, on a branch that follows one), ' : cli ? 'in a folder that is a git repository, ' : 'on a branch that follows a git repository, '}a file you change stays in a box until you commit it. Everyone sees the change, but it is in nobody else's folder, so nobody else's git can commit it. Committing it (or putting it back) opens the box by itself; finishing does not.`,
|
|
87
|
+
'- `quilt_unpack` shares a box early when someone needs it: decide yourself, and ask your person first for a large, risky or critical change or when the project\'s rules say so. A file boxed by someone else (`quilt_status` lists Boxed work) is their unfinished work and not in your folder yet: if you edit it, their box opens and your change merges with their work.',
|
|
88
|
+
'- Always re-read a file right before you change it: others change files underneath you.',
|
|
90
89
|
'- `quilt_history` shows who changed which file, when, for which task, with the diff: read it for the files you are about to touch.',
|
|
91
90
|
cliOnly('- `quilt_send_file` sends a file (a screenshot, a log, a draft) through chat without adding it to the project; `quilt_get_file` fetches one someone sent'),
|
|
92
91
|
'',
|
|
@@ -109,7 +108,8 @@ export function agentGuide ({ apiUrl = 'https://api.heyquilt.com', via = 'both'
|
|
|
109
108
|
http ? `- ${both ? 'Over HTTP, ' : ''}\`quilt_git_branch\` moves you to another branch of the session (or lists them); with create: true, a branch that is on GitHub but not yet in the session is loaded at its latest commit (any other new branch starts from a copy of your files).` : null,
|
|
110
109
|
`- \`quilt_commit_status\` also says whose AI is still working${cli ? `; \`quilt_wait_until_idle\` waits for every other AI to finish${both ? ' (CLI only)' : ''}` : ''}. \`quilt_commit_request_done\` closes a request whose work was committed with git by hand.`,
|
|
111
110
|
'- The session owner can give the relay a read-only GitHub token for a private repository with `quilt_github_token` (owner only).',
|
|
112
|
-
cliOnly('- Quilt merges on its own: changes made offline, by a pull or on GitHub are combined with the session\'s by Quilt
|
|
111
|
+
cliOnly('- Quilt merges on its own: changes made offline, by a pull or on GitHub are combined with the session\'s by Quilt, as live edits are (below). `quilt_merges` says what it merged'),
|
|
112
|
+
'- Two edits to the same lines: nobody wins automatically. The version that landed first stays and the other writer\'s lines are held (so is a write that removes lines someone else added minutes before, and a merge that would not parse); changes to different lines all go in. Every open conflict is listed at the top of every Quilt answer, to every AI, until one resolves it with `quilt_resolve_merge` (theirs, mine or edited): its writer is asked first, any AI may take it, and nothing holds the file meanwhile. Removing a name other files still use gets a warning with those uses.',
|
|
113
113
|
'',
|
|
114
114
|
'### How Quilt wakes you (step 2 of joining)',
|
|
115
115
|
`- Choose how Quilt wakes you when you are mentioned, sent a direct message, handed a task or sent email, so you answer without anyone checking on you: \`quilt_wake\` with no arguments lists the ways that fit you, and \`quilt_wake\` with \`method\` sets one up and records it (people see how each agent wakes)${cli ? '. CLI: `quilt wake [method]`' : ''}${http ? `. Over HTTP without an MCP client: GET or PUT ${apiUrl}/v1/agents/me/wake with your access key` : ''}. Until you choose, every answer reminds you.`,
|
package/src/ui/app.css
CHANGED
|
@@ -194,10 +194,6 @@ textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
|
|
|
194
194
|
.person .files code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }
|
|
195
195
|
.empty-note { color: var(--faint); font-size: 13px; padding: 10px 2px; }
|
|
196
196
|
|
|
197
|
-
.claim { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 4px; background: var(--panel-2); margin-bottom: 6px; font-size: 13px; }
|
|
198
|
-
.claim .meta { flex: 1; min-width: 0; }
|
|
199
|
-
.claim code { font-weight: 600; }
|
|
200
|
-
.claim .sub { color: var(--muted); font-size: 12px; }
|
|
201
197
|
|
|
202
198
|
/* chat */
|
|
203
199
|
.chat-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
|
|
@@ -712,7 +708,7 @@ textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
|
|
|
712
708
|
.t-badge { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 0 6px; height: 18px; border-radius: 999px; white-space: nowrap; }
|
|
713
709
|
.t-badge svg { width: 10px; height: 10px; }
|
|
714
710
|
.t-badge.edit { background: color-mix(in srgb, var(--edit) 15%, transparent); color: var(--edit); }
|
|
715
|
-
/* On a narrow row the "edited" badge gives way first: the file name and a
|
|
711
|
+
/* On a narrow row the "edited" badge gives way first: the file name and a box stay whole. */
|
|
716
712
|
.t-badge.edit, .t-badge.mine { flex: 0 1 auto; min-width: 0; display: block; line-height: 18px; overflow: hidden; text-overflow: ellipsis; }
|
|
717
713
|
.t-badge.mine { background: var(--panel-2); color: var(--muted); }
|
|
718
714
|
.t-badge.chat { background: var(--panel-2); color: var(--muted); font-weight: 600; }
|
|
@@ -723,28 +719,15 @@ textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
|
|
|
723
719
|
.t-gh { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
724
720
|
button.t-badge { border: 0; font-family: inherit; cursor: pointer; }
|
|
725
721
|
button.t-badge:hover, button.t-badge:focus-visible { box-shadow: inset 0 0 0 1px currentColor; }
|
|
726
|
-
/* margin: 0 undoes the claim card's margin-bottom (.claim), which lifted the pill off the row's middle. */
|
|
727
|
-
.t-badge.claim { margin: 0; background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
|
|
728
|
-
.t-badge.claim.inside { background: transparent; border: 1px dashed color-mix(in srgb, var(--violet) 45%, transparent); }
|
|
729
722
|
.t-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--edit); flex: none; }
|
|
730
723
|
.t-more { margin-left: auto; flex: none; width: 24px; height: 22px; border: 0; background: none; border-radius: 6px; color: var(--muted); cursor: pointer; display: grid; place-items: center; opacity: 0; }
|
|
731
724
|
.t-row:hover .t-more, .t-row:focus-within .t-more, .t-more:focus-visible { opacity: 1; }
|
|
732
725
|
.t-more:hover { background: var(--border); }
|
|
733
726
|
@media (hover: none) { .t-more { opacity: .7; } }
|
|
734
|
-
.tree-menu { width: 260px; padding: 8px; }
|
|
735
727
|
.pop-title { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 4px 6px 8px; overflow-wrap: anywhere; }
|
|
736
728
|
.pop-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 4px; cursor: pointer; text-align: left; font-weight: 500; }
|
|
737
729
|
.pop-item:hover, .pop-item:focus-visible { background: var(--panel-2); outline: none; }
|
|
738
|
-
.pop-item svg
|
|
739
|
-
.pop-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px; font-size: 13px; color: var(--muted); }
|
|
740
|
-
.pop-note svg { flex: none; margin-top: 2px; }
|
|
741
|
-
.pop-queue { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
|
|
742
|
-
.pop-req { font-size: 13px; overflow-wrap: anywhere; }
|
|
743
|
-
.pop-req .hint { margin-top: 2px; }
|
|
744
|
-
.pop-form textarea.input { height: auto; }
|
|
745
|
-
.pop-form { display: flex; flex-direction: column; gap: 8px; padding: 4px; }
|
|
746
|
-
.pop-form .input { height: 34px; }
|
|
747
|
-
.pop-form .btn { align-self: flex-end; }
|
|
730
|
+
.pop-item svg { width: 14px; height: 14px; }
|
|
748
731
|
|
|
749
732
|
/* main area */
|
|
750
733
|
/* The work sits on the canvas; inside it the canvas is the ground, so what paints var(--bg) (the Loom's
|
|
@@ -833,8 +816,8 @@ button.t-badge:hover, button.t-badge:focus-visible { box-shadow: inset 0 0 0 1px
|
|
|
833
816
|
.fv-banner .spacer { flex: 1; }
|
|
834
817
|
.fv-path { font-weight: 600; }
|
|
835
818
|
.fv-edited { color: var(--muted); }
|
|
836
|
-
.fv-
|
|
837
|
-
.fv-
|
|
819
|
+
.fv-box { display: inline-flex; align-items: center; gap: 5px; color: var(--box); font-weight: 600; }
|
|
820
|
+
.fv-box svg, .fv-banner .btn svg { width: 13px; height: 13px; }
|
|
838
821
|
.fv-scroll { flex: 1; overflow: auto; background: var(--panel); }
|
|
839
822
|
.fv-code { border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; min-width: 100%; }
|
|
840
823
|
.fv-code td { padding: 0 12px; vertical-align: top; }
|
|
@@ -1197,7 +1180,7 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1197
1180
|
@media (min-width: 901px) {
|
|
1198
1181
|
.ws-body.tree-collapsed .pane-head { flex-direction: column; gap: 6px; }
|
|
1199
1182
|
}
|
|
1200
|
-
/* The folded
|
|
1183
|
+
/* The folded Boxes pane's rail (rail.js): whose unfinished work is boxed. */
|
|
1201
1184
|
.tree-rail { display: none; }
|
|
1202
1185
|
@media (min-width: 901px) {
|
|
1203
1186
|
.ws-body.tree-collapsed .tree-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 0 12px; flex: none; }
|
|
@@ -1206,18 +1189,13 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1206
1189
|
.rail-sig:hover, .rail-who:hover, .rail-more:hover, .rail-sig:focus-visible, .rail-who:focus-visible, .rail-more:focus-visible, .rail-sig[aria-expanded="true"], .rail-who[aria-expanded="true"] { background: var(--panel-2); color: var(--text); outline: none; }
|
|
1207
1190
|
.rail-sig svg { width: 17px; height: 17px; }
|
|
1208
1191
|
.rail-n { position: absolute; right: -3px; bottom: -3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); font-size: 9.5px; font-weight: 700; line-height: 13px; text-align: center; font-variant-numeric: tabular-nums; }
|
|
1209
|
-
.rail-sig.
|
|
1210
|
-
.rail-sig.
|
|
1211
|
-
.rail-sig.
|
|
1212
|
-
.rail-sig.waiting { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); animation: rail-call 1.8s ease-in-out infinite; }
|
|
1213
|
-
.rail-sig.waiting .rail-n { background: var(--warn); border-color: var(--warn); color: var(--panel); }
|
|
1214
|
-
@keyframes rail-call { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 45%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
|
|
1192
|
+
.rail-sig.box { color: var(--box); }
|
|
1193
|
+
.rail-sig.box.none { color: var(--faint); }
|
|
1194
|
+
.rail-sig.box.mine .rail-n { background: var(--box); border-color: var(--box); color: var(--panel); }
|
|
1215
1195
|
.rail-who .avatar { width: 26px; height: 26px; font-size: 11px; }
|
|
1216
|
-
.rail-who.ai .avatar { border-radius: 7px; } /* an AI
|
|
1217
|
-
.rail-q { position: absolute; right: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); }
|
|
1196
|
+
.rail-who.ai .avatar { border-radius: 7px; } /* an AI's work: square, like the AI tag beside a lane's name */
|
|
1218
1197
|
.rail-more { font-size: 11px; font-weight: 700; }
|
|
1219
1198
|
.rail-sep { width: 18px; height: 1px; background: var(--border); margin: 2px 0; flex: none; }
|
|
1220
|
-
@media (prefers-reduced-motion: reduce) { .rail-sig.waiting { animation: none; } }
|
|
1221
1199
|
/* The lock list beside the rail, or a Loom lane's "holds": who holds what, how long, why, who waits. */
|
|
1222
1200
|
.lk-pop {
|
|
1223
1201
|
position: fixed; z-index: 45; width: 300px; max-width: calc(100vw - 16px); max-height: min(70vh, 520px); overflow: auto; padding: 10px 0 8px;
|
|
@@ -1230,7 +1208,7 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1230
1208
|
.lk-total { font-variant-numeric: tabular-nums; }
|
|
1231
1209
|
.lk-list { list-style: none; margin: 0; padding: 0; }
|
|
1232
1210
|
.lk-row { padding: 7px 12px 8px; border-top: 1px solid var(--border); }
|
|
1233
|
-
.lk-row.ours { background: color-mix(in srgb, var(--
|
|
1211
|
+
.lk-row.ours { background: color-mix(in srgb, var(--box) 6%, transparent); }
|
|
1234
1212
|
.lk-main { width: 100%; display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
1235
1213
|
.lk-main:disabled { cursor: default; }
|
|
1236
1214
|
.lk-main:not(:disabled):hover .lk-name, .lk-main:focus-visible .lk-name { text-decoration: underline; text-underline-offset: 3px; }
|
|
@@ -1238,15 +1216,11 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1238
1216
|
.lk-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
|
|
1239
1217
|
.lk-name { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1240
1218
|
.lk-count { margin-left: 6px; font-family: var(--sans); font-weight: 500; color: var(--muted); }
|
|
1241
|
-
.lk-held { flex: none; font-size: 11.5px; font-weight: 600; color: var(--
|
|
1219
|
+
.lk-held { flex: none; font-size: 11.5px; font-weight: 600; color: var(--box); font-variant-numeric: tabular-nums; }
|
|
1242
1220
|
.lk-dir { padding-left: 15px; font-family: var(--mono); font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1243
1221
|
.lk-who { padding-left: 15px; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
|
|
1244
1222
|
.lk-who b { font-weight: 600; color: var(--text); }
|
|
1245
1223
|
.lk-who i { font-style: normal; color: var(--faint); }
|
|
1246
|
-
.lk-q, .lk-free { padding-left: 15px; margin-top: 3px; font-size: 11.5px; }
|
|
1247
|
-
.lk-q { display: flex; align-items: flex-start; gap: 5px; color: var(--warn); }
|
|
1248
|
-
.lk-q svg { width: 12px; height: 12px; flex: none; margin-top: 2px; }
|
|
1249
|
-
.lk-free { color: var(--faint); }
|
|
1250
1224
|
.lk-none { margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--border); color: var(--muted); }
|
|
1251
1225
|
.lk-foot { padding: 7px 12px 0; border-top: 1px solid var(--border); font-size: 11px; color: var(--faint); }
|
|
1252
1226
|
.linkish { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; overflow-wrap: anywhere; text-align: left; }
|
|
@@ -1561,6 +1535,12 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1561
1535
|
.pm-switch b { display: block; font-weight: 600; font-size: 13px; }
|
|
1562
1536
|
.pm-switch small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
|
|
1563
1537
|
.pm-switch.off { opacity: .55; cursor: default; }
|
|
1538
|
+
/* A setting with a number (Session settings → Version control: stale_write_minutes). */
|
|
1539
|
+
.pm-number { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
|
|
1540
|
+
.pm-number b { display: block; font-weight: 600; font-size: 13px; }
|
|
1541
|
+
.pm-number small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
|
|
1542
|
+
.pm-number-in { display: flex; align-items: center; gap: 6px; flex: none; }
|
|
1543
|
+
.pm-number-in input { width: 72px; text-align: right; }
|
|
1564
1544
|
.pm-switch input { appearance: none; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
|
|
1565
1545
|
.pm-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
|
|
1566
1546
|
.pm-switch input:checked { background: var(--ok); }
|
|
@@ -1599,7 +1579,7 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1599
1579
|
.pm-list .pm-sep { margin: 6px 8px; }
|
|
1600
1580
|
|
|
1601
1581
|
/* Boxes under each person (boxes.js; docs/mockups/2026-10-16-boxes.html, option C). A box is someone's
|
|
1602
|
-
unfinished work on a file: amber
|
|
1582
|
+
unfinished work on a file: amber. Its change opens in place, under its row. */
|
|
1603
1583
|
:root { --box: var(--warn); }
|
|
1604
1584
|
.pm-boxsum { color: var(--muted); font-size: 12px; }
|
|
1605
1585
|
.pm-boxes { display: grid; gap: 2px; padding: 0 8px 8px 50px; min-width: 0; }
|
|
@@ -1632,8 +1612,7 @@ details.choice-foot .hint { display: block; margin-top: 6px; }
|
|
|
1632
1612
|
.bx-foot .btn, .bx-unpack { width: 100%; height: 26px; font-size: 12px; font-weight: 600; gap: 6px; }
|
|
1633
1613
|
.bx-foot .btn svg, .bx-unpack svg { width: 13px; height: 13px; flex: none; }
|
|
1634
1614
|
.bx-unpack { margin: 2px 0 4px; color: var(--box); border-color: color-mix(in srgb, var(--box) 45%, var(--border-strong)); }
|
|
1635
|
-
.bx-
|
|
1636
|
-
.bx-asked svg { width: 13px; height: 13px; flex: none; }
|
|
1615
|
+
.bx-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
|
|
1637
1616
|
.t-badge.box { background: color-mix(in srgb, var(--box) 16%, transparent); color: var(--box); }
|
|
1638
1617
|
.t-badge.box.own { background: color-mix(in srgb, var(--box) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--box) 40%, transparent); }
|
|
1639
1618
|
.t-row.ghost .t-name { color: var(--muted); font-style: italic; }
|