Repository navigation
fix(v2): create-pod options rendered as plain prose — the reset ate them - #870
Merged
Merged
Conversation
Sam, the night before the YC interview: "not usable, no intuition on what is clicked, and no distinction at all." Verified live with a seeded smoke user: both option buttons computed to background transparent, border 0, padding 0 — plain text. The join-policy choice was invisible and the active state painted nothing. Root cause is this codebase's most-documented CSS trap claiming another victim: the global button reset (.v2-root button:not(.MuiButtonBase-root), specificity 0-2-1) beats a bare class (0-1-0) and strips exactly the properties that make an option look like an option. The reaction chips and filter segments already carry the .v2-root button. prefix workaround; the create panel never got it. Compounding it, the intended --active style used a GRAY border (--v2-border-strong) — near-invisible even had it won. Fix, verified by CSS injection on production before committing (before/after screenshots, both selection states toggled): prefixed rules that survive the reset; selected = accent-soft fill + accent border + a 6px accent dot beside the label; hover feedback; 80ms transitions per the design system. Create itself was never broken — smoke user created and deleted a pod end-to-end — the UI was just illegible. Guarded in v2-layout-invariants: the prefix must exist and --active must reference var(--v2-accent). 22/22 invariants, sidebar + create-hook suites green.
lilyshen0722
added a commit
that referenced
this pull request
Aug 6, 2026
…768) (#872) The creation flow's most prominent choice has been inert for every non-admin since it shipped. `createPod` writes `joinPolicy` and hardcodes `type`, while `communityListed` — the flag that decides whether anyone can FIND the pod — was writable only from routes/admin/pods.ts behind adminAuth. Since self-joinable is `community AND open`, a user picking "Open to join" got a pod nobody could discover, and no path existed to fix it. Two halves. **1. POST /api/pods/:id/visibility { tier: 'private' | 'community' }** Owner- or admin-scoped, rate limited to 10/hour (this is the one owner action that exposes content to non-members and to people with no account), audited on every call, and refused for DM kinds. It writes BOTH flags in ONE action, deliberately, rather than mirroring the admin surface's two steps. The admin route separates them because `showcase` (publicRead without listing) is a real curated state it needs to express — but an owner cannot reach that state, so an owner-side two-step would 409 on `listing_requires_public_read` forever with no way to clear it. Writing the pair together is also exactly what ADR-016 invariant 1 (listed => readable) asks of a writer that can prove it. `showcase` stays admin-only: it publishes every future message to anonymous readers. Not exposed to agents. An agent able to publish its own pod could exfiltrate a private room's entire future history in one call. **2. Creation asks for intent, not audience** The two option cards are gone. Every pod is born private; `joinPolicy: 'open'` below the community tier is the DORMANT declaration ("open once listed"), not a choice a stranger should be making about a room with nothing in it yet. Visibility becomes a later, deliberate act on a pod that has content worth disclosing — which is ADR-016's own position. This also retires the selected-state dot from #870: with the cards gone it has nothing to mark, and it was a fourth signal saying what the accent fill, border and text colour already said. Verified against production before writing: ZERO pods sit in an unrepresentable state (listed-but-unreadable), so no migration is required — 235 pods land in exactly the three tiers, and the 18 legacy null joinPolicy rows are already handled by the fail-open predicate. Tests: 15 new on the route (invariant 1 held on promote, showcase refused, non-owner refused, DM kinds refused, audit written, audit failure non-fatal, limiter wired). Frontend suites updated for the simplified form, including a zh-CN case so the removal cannot be done in the component but missed in the catalog. Layout invariant now asserts the option RULES are gone, and documents that anything reintroducing them needs the `.v2-root button.` prefix or it renders as plain prose (#870).
lilyshen0722
added a commit
that referenced
this pull request
Aug 18, 2026
…atalog (#951) * fix(onboarding): in-pod "add an agent" leads to connect, not the v1 catalog The invite modal's Agent tab offered exactly one button, into /v2/agents/browse — the v1 AgentsHub (5,039 lines, living in src/components, not src/v2). Its catalog serves 21 internal and smoke-test rows beside real entries: smoke-claude, demo-target, demo-clean2, smokea50698-*, pod-architect, cl-critic, claude-on-dev, sam-local-codex, hq-support, moltbot. On 2026-08-14 a real user took that door. They installed the `claude-code` template, never started a local session, asked it the same question three times across two pods, and got silence — while a working Scout sat in the next room answering them in four seconds. Connect-your-own now leads; the catalog is demoted to a secondary link rather than removed. Note `?pod=` — V2AgentBYO reads `pod`, not `podId`, and the old link passed `podId`, so even the catalog hop lost the pod context. Copy changed with it: the hint described picking from a catalog, which set the wrong expectation before the click. Both locales — two of the users this is for wrote Chinese. The secondary button carries the `.v2-root button.` prefix: the global reset is 0-2-1 and beats a bare class, which has shipped once as a styled action rendering like plain prose (#870). Tests pin the destinations, including the `?pod=` vs `?podId=` distinction that turns a two-minute flow into an unprefilled form. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 * fix(test): update the starter-panel assertion to the new primary action CI caught a real break I caused. The existing V2InviteModal suite asserts the agent tab renders a button named "Browse agents →", and this branch renamed that CTA — so the starter-panel deep-link test failed. My mistake was narrower than the rename: I ran my NEW test and not its neighbours. Same class as everything else caught today — verify the thing that runs, and run the things around it. The assertion now pins the intent rather than the old string: the starter panel deep-links to the agent tab and must land on connect-your-own (the flow that works), with the catalog present but demoted. Both buttons asserted, so a future change cannot quietly drop either. 7 tests pass across both invite-modal suites. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 --------- Co-authored-by: Claude Fable 5 <[email protected]>
lilyshen0722
added a commit
that referenced
this pull request
Aug 22, 2026
Faithful to the accepted proof: raised cards on the Slate Mist ground, sample exchanges pressed INTO the surface, soft chips, cobalt only on the CTA with the raised-to-pressed interaction. CTA selector uses the documented .v2-root button. prefix (v2.css:755, #870) — the reset ate the first cut's fill and local verification caught it before any deploy, which is the entire point of the new local-first process.
samxu01
pushed a commit
that referenced
this pull request
Aug 22, 2026
Found by measuring in a real browser, which is the only place it is visible. Computed colour on `.v2-thread-card__main` was rgb(17,24,39) while the rule said #4b5563, and `.v2-thread-card__follow--on` rendered at body colour instead of accent — so the follow state had no visual difference from Muted and the card sat at full-strength text against @ux-lead's secondary spec. Cause: `.v2-root button:not(.MuiButtonBase-root)` is 0-2-1 and sets `color: inherit`. My rules were 0-1-0 and lost. This repo already has the trap written down next to that reset, from #870, along with the fix — the `.v2-root button.` prefix, which ties at 0-2-1 and wins on source order because this block is appended last. Applied to all six button rules. The presence guard could not catch this and it is worth being precise about why: the rule IS present, spelled correctly, with the right value. Only the cascade defeats it. That is the exact gap a real-browser check exists to cover, and it is the second thing today whose evidence and whose instrument disagreed about the same file. Guard updated to pin the PREFIXED selector and the colour, so dropping the prefix now fails in CI rather than silently in production. Measured at 1200 and at 390, after the fix: card colour rgb(75,85,99) = #4b5563 count at rest rgb(75,85,99) — no accent count addressed rgb(47,111,235) = #2f6feb follow --on rgb(47,111,235) aim button rgb(123,132,148) = #7b8494 chevron transform matrix(-1,0,0,-1,0,0) = 180deg min-height 44px · box-shadow none · border #e5e7eb · radius 10px rail 28px/40px at 1200, 24px/40px at 390, border 2px #eef0f6 root-to-card gap 4px (brief: no more than 8) One thing I checked rather than reported: the harness showed horizontal overflow at 390. Removing the harness's own 24px body padding eliminated it entirely (scrollWidth 390 = clientWidth 390), so it was my test page and not the components. Tested rather than assumed, because "probably the harness" is how a real 390 overflow ships. Co-Authored-By: Claude Opus 5 <[email protected]>
lilyshen0722
added a commit
that referenced
this pull request
Aug 23, 2026
…oser (TASK-029 4/4) (#1150) * feat(threading): the collapsed render — headline card, rail, one composer TASK-029 4/4, built to @ux-lead's render brief (57421). The brief is the ruling in pixels, so this is measured against it rather than interpreted. WHAT LANDS - useV2ThreadState — the pod's per-user thread state (#1145). `collapsed` arrives RESOLVED and is never computed here; there is deliberately no cutoff in the payload to compute it from. A fetch failure degrades to "no threads known", which renders flat: inventing collapsed:true on an error would hide replies the user could see a second ago, with no way to tell that from an empty pod. - V2ThreadCard — count, up to three faces, short stamp. No reply bodies, no names: the card is a door, not a preview. Accent appears only when something in the thread addresses you; ambient activity never colours it, which is 3/4's ambient/addressed split made visible. - buildThreadView — folds replies under their root. Pure and outside the 1,300-line component because this is where the edge cases are. A reply whose root is not on the page renders FLAT rather than vanishing; losing a message is worse than showing it in the wrong place. - One composer, two chip states. aimAtThread/aimAtMessage each clear the other, so a send carries a thread root or an addressing edge, never both — the resolver 400s both, and joining a thread must not ping the root author. Targets clear on success only, so a failed send keeps its aim (#1118). - Follow renders the raw tri-state. null is "Follow" (an invitation), false is "Muted" (a state); Boolean(null) collapsing those two is the bug the tri-state exists to prevent. sendMessage takes a 4th positional. Two real callers, so an options-object refactor would be churn beyond this brief — but four positionals with two optional is a smell, and a fifth is the moment to change shape. TESTS — 286 v2 tests green, 34 of them new. - shortTime: boundaries, with `now` injected so the test is about the boundary and not about the clock. - threadView: fold, dedupe, orphan-renders-flat, newest-reply timestamp. - V2ThreadCard: the brief's items 1 and 5, including that follow is a SIBLING of the expand control — a button inside a button is invalid, and a mis-hit that silently mutes is the expensive direction. - v2-layout-invariants: rail geometry, no-shadow, no-accent-at-rest, and that reduced-motion actually reaches the 300ms transitions. jsdom has no layout engine, so these are presence guards standing in for the browser check. NOT DONE HERE: the real-browser pass at 1200 and 390. I will run it and report what I saw rather than claiming the numbers. frontend/package-lock.json was rewritten by my local `npm install` (16,631 insertions) and is deliberately NOT in this commit. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(threading): the card rules lost to the global button reset Found by measuring in a real browser, which is the only place it is visible. Computed colour on `.v2-thread-card__main` was rgb(17,24,39) while the rule said #4b5563, and `.v2-thread-card__follow--on` rendered at body colour instead of accent — so the follow state had no visual difference from Muted and the card sat at full-strength text against @ux-lead's secondary spec. Cause: `.v2-root button:not(.MuiButtonBase-root)` is 0-2-1 and sets `color: inherit`. My rules were 0-1-0 and lost. This repo already has the trap written down next to that reset, from #870, along with the fix — the `.v2-root button.` prefix, which ties at 0-2-1 and wins on source order because this block is appended last. Applied to all six button rules. The presence guard could not catch this and it is worth being precise about why: the rule IS present, spelled correctly, with the right value. Only the cascade defeats it. That is the exact gap a real-browser check exists to cover, and it is the second thing today whose evidence and whose instrument disagreed about the same file. Guard updated to pin the PREFIXED selector and the colour, so dropping the prefix now fails in CI rather than silently in production. Measured at 1200 and at 390, after the fix: card colour rgb(75,85,99) = #4b5563 count at rest rgb(75,85,99) — no accent count addressed rgb(47,111,235) = #2f6feb follow --on rgb(47,111,235) aim button rgb(123,132,148) = #7b8494 chevron transform matrix(-1,0,0,-1,0,0) = 180deg min-height 44px · box-shadow none · border #e5e7eb · radius 10px rail 28px/40px at 1200, 24px/40px at 390, border 2px #eef0f6 root-to-card gap 4px (brief: no more than 8) One thing I checked rather than reported: the harness showed horizontal overflow at 390. Removing the harness's own 24px body padding eliminated it entirely (scrollWidth 390 = clientWidth 390), so it was my test page and not the components. Tested rather than assumed, because "probably the harness" is how a real 390 overflow ships. Co-Authored-By: Claude Opus 5 <[email protected]> * i18n(threading): the zh-CN half of the thread strings CI caught what my local run could not, because my local run was the wrong population again — I ran `src/v2`, and the parity suite lives in `src/i18n`. Two failures, one cause: I added `podChat.thread.*` to en.json and nothing to zh-CN.json, so the base-key-parity test and the migrated-component key resolution both went red. V2PodChat is in the migrated manifest, so a key it calls `t()` on must exist in BOTH locales or the Chinese UI renders the raw key path. Translations follow the neighbouring reply strings rather than the English punctuation: `replyingTo` ends in a full-width colon, so the thread chip uses the same separator instead of the ASCII middot the English carries. THE METHOD, since this is the third time today and the first two fixes did not generalise. I fixed the backend miss by enumerating suites that reference the changed symbols, then made the identical narrow-selection error on the frontend an hour later — a fix scoped to the instance, not the class. The actual rule is simpler and I should have reached for it first: run the suite the CI JOB runs, with no path filter. Full frontend suite is 34 seconds and 413 tests. There was never a reason to sample it. Verified: 77 suites, 413 tests, green. Co-Authored-By: Claude Opus 5 <[email protected]> * test(threading): pin the composer's two target kinds — thread sends threadRootId and no reply edge, and each aim clears the other Shape-gate requirement from ux-lead (pod 57449/57459) for TASK-029 4/4, constraint 4: the composer has one target with two kinds. Adds the two cases the existing tests did not cover — 'Reply in thread' sends (text, 'text', undefined, rootId); aiming at a thread after a reply (and a reply after a thread) sends only the later kind. Test-only. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sam, the night before the YC interview: "not usable, no intuition on what is clicked, and no distinction at all." He was measurably right — verified live with a seeded smoke user, both option buttons computed to
background: transparent, border: 0px, padding: 0. The join-policy choice rendered as two paragraphs of prose. The active state painted nothing.Root cause
This codebase's most-documented CSS trap claiming another victim: the global reset
.v2-root button:not(.MuiButtonBase-root)(specificity 0-2-1) beats a bare class (0-1-0) and strips exactly the properties that make an option look like an option. The reaction chips (#867) and filter segments already carry the.v2-root button.prefix workaround — the create panel never got it. Compounding: the intended--activestyle used a gray border (--v2-border-strong), near-invisible even had it won the cascade.Fix — verified on production before committing
CSS-only. Injected the rules into the live page with a seeded smoke user and screenshotted both selection states before shipping: selected = accent-soft fill + accent border + 6px accent dot beside the label; unselected = plain card with hover feedback; 80ms transitions per the design system.
Also verified the full path while there: create was never broken — smoke user created a pod end-to-end (and deleted it after). The UI was just illegible, which reads as broken.
Guard
v2-layout-invariants: the prefixed rule must exist and--activemust referencevar(--v2-accent)— both jsdom-invisible properties. 22/22 invariants, sidebar + create-hook suites green.Post-interview (#770 remains open): the considered creation flow against ratified ADR-016 — this PR makes the existing panel legible, it does not redesign it.