heyquilt 0.3.168 → 0.3.170

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,10 @@ 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.170 — 2026-11-13
15
+
16
+ - **Your folder is in Seam by itself.** A new session's folder no longer shows "∅ has no square yet" with a button to press: Quilt opens its square on its own (and tries again every minute if it can't), so your edits reach everyone from the start. Only if that keeps failing does the session say why, with **Try again now**.
17
+
14
18
  ## 0.3.168 — 2026-11-13
15
19
 
16
20
  - **Sign up right in the app.** **Create an account** on Quilt's sign-in screen now asks for your name, email and a password, emails you a 6-digit code, and once you type it in you're signed in, with this computer linked to your new account. No browser needed. You can still sign up on heyquilt.com instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyquilt",
3
- "version": "0.3.168",
3
+ "version": "0.3.170",
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",
package/src/session.js CHANGED
@@ -149,6 +149,8 @@ const WATCH_RECHECK_MS = 80
149
149
  const RECONCILE_MS = 1000
150
150
  // Failed large-file uploads and downloads are tried again this often (and on reconnecting).
151
151
  const RETRY_MS = 30 * 1000
152
+ // A folder with no square for its branch asks for one by itself, again this long after a try that failed.
153
+ const SQUARE_AUTO_RETRY_MS = 60 * 1000
152
154
  // A move to a branch the relay can't load (or refused) is tried again at most this far apart.
153
155
  const MOVE_RETRY_MAX_MS = 5 * 60 * 1000
154
156
  // Large uploads and downloads each hold the whole file in memory (twice), so only this many run at once.
@@ -629,9 +631,9 @@ export class Session extends EventEmitter {
629
631
  this.conn.on('status', (s) => {
630
632
  this.log(s === 'connected' ? `connected to relay` : 'disconnected from relay, reconnecting…')
631
633
  this.scheduleStatusWrite()
632
- if (s === 'connected') { this.moveRetryAt = 0; this.retryFailed() }
634
+ if (s === 'connected') { this.moveRetryAt = 0; this.retryFailed(); this.ensureSquare() }
633
635
  })
634
- this.retryTimer = setInterval(() => this.retryFailed(), RETRY_MS)
636
+ this.retryTimer = setInterval(() => { this.retryFailed(); this.ensureSquare() }, RETRY_MS)
635
637
  this.retryTimer.unref()
636
638
  this.conn.on('warn', (m) => this.emit('debug', m))
637
639
  this.conn.on('fatal', (err) => this.emit('fatal', err))
@@ -650,6 +652,7 @@ export class Session extends EventEmitter {
650
652
  if (!this.squareFollower) this.squareFollower = new SquareFollower(this)
651
653
  this.squareFollower.onQuilt(q).catch(() => {})
652
654
  this.renewReadToken().catch(() => {})
655
+ this.ensureSquare()
653
656
  })
654
657
  // A write of this folder's reached a read-only branch document at layout 3: it was not kept (server.js refusedReadOnly).
655
658
  this.conn.on('read-only', (r) => this.noteReadOnly(r))
@@ -2016,7 +2019,24 @@ export class Session extends EventEmitter {
2016
2019
  squareless () {
2017
2020
  if (!this.quilt || this.quilt.layout !== 3 || !this.root) return null
2018
2021
  const branch = this.squareBranchKey()
2019
- return squareFor(this.quilt, branch) ? null : { branch }
2022
+ if (squareFor(this.quilt, branch)) return null
2023
+ // ∅ is a folder with no git branch: the quilt's main line. `error`: why the square couldn't be opened by itself.
2024
+ return { branch: branch === DEFAULT_KEY ? 'main' : branch, ...(this.squareOpenError ? { error: this.squareOpenError } : {}) }
2025
+ }
2026
+
2027
+ /**
2028
+ * A folder that may change files never waits on a button: when its branch has no square, one is opened
2029
+ * for it by itself (when the quilt changes, on connecting, and every minute after a try that failed),
2030
+ * with what is on disk as its work. Only a failure is shown, with why and the button to try again.
2031
+ */
2032
+ ensureSquare () {
2033
+ if (this.stopped || this.openingSquare || !this.access || this.access.role === 'viewer' || !this.squareless()) return
2034
+ if (!this.conn || !this.conn.connected || Date.now() < (this.squareAutoAt || 0)) return
2035
+ this.squareAutoAt = Date.now() + SQUARE_AUTO_RETRY_MS
2036
+ this.openBranchSquare(this.squareBranchKey(), { quiet: false }).then(
2037
+ () => { this.squareOpenError = null; this.scheduleStatusWrite() },
2038
+ (err) => { this.squareOpenError = String((err && err.message) || err).slice(0, 300); this.scheduleStatusWrite() }
2039
+ )
2020
2040
  }
2021
2041
 
2022
2042
  /**
@@ -2037,6 +2057,7 @@ export class Session extends EventEmitter {
2037
2057
  if (/is not one of this session's branches/.test(err.message)) throw new Error(`${branch} was made after the session's code moved into Seam, so the session has nothing of it to start a square from. Check out a branch the session has (main, say) and your folder follows that branch's square; or ask the session's owner.`)
2038
2058
  throw err
2039
2059
  }
2060
+ this.squareOpenError = null
2040
2061
  return { square: r.square, text: r.opened ? `Opened square ${squareShort(r.square)} for ${branch}: your folder follows it in a moment, with your files as its work, and your edits reach everyone on it.` : `${branch} has a square already: ${squareShort(r.square)}; your folder follows it in a moment.` }
2041
2062
  }
2042
2063
 
@@ -99,7 +99,8 @@ export function squareCard (st) {
99
99
  const s = st.square
100
100
  const following = s && !s.opening && !s.problem
101
101
  // The relay's own words name a tool: a person gets plain ones, and the button in the square panel.
102
- if (st.squareless) return { ...squarelessWords(st), open: true }
102
+ // Opening by itself: the square button says so, no card. Only a try that failed gets one, with the button.
103
+ if (st.squareless) return st.squareless.error ? { ...squarelessWords(st), open: true } : null
103
104
  if (st.readOnly && !following) return { title: 'Your edits here are not reaching anyone', text: st.readOnly.why }
104
105
  if (!s) return null
105
106
  if (s.problem || s.opening) return { title: s.problem ? 'Not following its square yet' : 'Starting to follow its square', text: s.line }
@@ -124,6 +125,7 @@ export function squarePanelHtml (st, { busy = '' } = {}) {
124
125
  if (st.moving) return `${head}<div class="br-sub warn">${esc(movingCard(st).text)}</div></div>`
125
126
  if (st.squareless) {
126
127
  const w = squarelessWords(st)
128
+ if (!st.squareless.error) return `${head}<div class="br-sub">${esc(w.text)}</div></div>`
127
129
  return `${head}<div class="br-sub warn">${esc(w.text)}</div>${viewer ? '' : `<div class="sq-acts">${openSquareButton(st, busy)}</div>`}</div>`
128
130
  }
129
131
  if (!following) {
@@ -152,13 +154,15 @@ export function movingCard (st) {
152
154
  */
153
155
  export function squarelessWords (st) {
154
156
  const b = (st.squareless && st.squareless.branch) || 'this branch'
155
- return { title: `${b} has no square yet`, text: `Your folder is on ${b}, which has no square in Seam, so your edits here reach nobody. Open a square for it: your files stay as they are, they become its work, and everyone on ${b} follows it.` }
157
+ // Quilt opens the square by itself (session.js ensureSquare): only a try that failed needs anyone.
158
+ if (!(st.squareless && st.squareless.error)) return { title: 'Setting up this folder', text: `Quilt is opening a square on ${b} for this folder, so your edits reach everyone in the session. Your files stay as they are.` }
159
+ return { title: `Your edits aren't reaching anyone yet`, text: `Quilt couldn't open a square on ${b} for this folder (${st.squareless.error}), so your edits here stay on this computer. It tries again every minute; your files stay as they are.` }
156
160
  }
157
161
 
158
162
  /** The button that opens a square for the folder's branch (squareTool open_square). */
159
163
  export function openSquareButton (st, busy = '') {
160
164
  const b = (st.squareless && st.squareless.branch) || 'this branch'
161
- return `<button type="button" class="btn sm primary" data-square-open${busy ? ' disabled' : ''}>${busy === 'open' ? 'Opening…' : `Open a square for ${esc(b)}`}</button>`
165
+ return `<button type="button" class="btn sm primary" data-square-open${busy ? ' disabled' : ''}>${busy === 'open' ? 'Opening…' : 'Try again now'}</button>`
162
166
  }
163
167
 
164
168
  /** What the square holds not committed yet (everyone's on it), folded: what Commit takes. */