Thread header revision

merged…
osebo42d ago

Can you do a few iterations on the header so it has better information hierarchy and it’s less cluttered

IMG_8473.jpeg
IMG_8473.jpeg
8 repliesoldestnewest
Osebotfable-5-142d ago

The screenshot is the thread page header (title, then the Threads · threadide/ · branch thread/… · line, then WAITING · ■ LIVE · sign-in only · make public · delete). Today everything sits in one .thread-meta run of dot-separated text, so context (workspace, repo, branch), state (status, live) and actions (visibility, delete) all look the same.

Plan, iterated in mockups before touching the app:

  1. Split the line into three tiers: a quiet breadcrumb (Threads › threadide/, branch as a mono chip) above the title; the title; then a single status row with the badge and live dot. Actions (make public / anyone can reply / delete) move into a small "…" / "Manage" affordance at the right of the status row so they stop competing with the context.
  2. Collapse the two middle dots and the stray trailing · (visible in the screenshot after thread/a557c17c ·), and stop showing sign-in only · make public as one underlined blob.
  3. Keep the PR panel and the pinned post untouched; check 390px and 900px with Playwright mockups, then port to app/threads/[id]/page.tsx, components/thread-visibility.tsx, components/delete-thread.tsx and app/globals.css.

I'll post the iterations as screenshots so you can pick.

Osebotfable-5-142d agothreadide@30a433d

Thread header: three tiers instead of one dotted line

Pushed 30a433d on thread/222748f2. The screenshots attached are static mockups against the real globals.css (the app needs Postgres + GitHub OAuth, so it can't run in the sandbox); tsc --noEmit is clean.

What was wrong (your screenshot)

Threads · threadide/ · branch thread/a557c17c · WAITING · ■ LIVE · sign-in only · make public · delete put context, state and actions in one run of equal-weight text, with a stray · before the wrap and sign-in only · make public as one underlined blob.

Iterations I tried

  • A (current): shown as "before".
  • B: three tiers with actions inline at the right of the status row as mono labels (MAKE PUBLIC DELETE). At 390px they orphan onto a second row and still read as noise. Rejected.
  • C (shipped): three tiers plus a single Manage menu.

What shipped (C)

Threads / threadide / thread/a557c17c        ← .thread-crumbs: where it lives (quiet, mono repo + branch)
Areal font                                   ← h2.thread-h
[WAITING] ■ LIVE [PUBLIC]        MANAGE ⌄    ← .thread-status: state only; Manage at the right (creator/owner)
  • Sign-in only is no longer labelled: it's the default. A thread shows a green PUBLIC badge (and ANYONE CAN REPLY) only when it was opened up, so the state row is empty of visibility noise for most threads.
  • Manage (components/thread-menu.tsx) holds Make public / Make sign-in only, Let anyone reply / Require sign-in to reply (public threads only) and Delete thread. Items say what they'd do, not what the state is. Widening access and delete stay two-tap: the item rewords itself as a question in red, 4s to confirm; closing the menu disarms it. Same close rules as the avatar menu (Escape, outside tap).
  • thread-visibility.tsx and delete-thread.tsx are gone; .thread-meta CSS replaced by the .thread-crumbs / .thread-status / .thread-menu block.
  • "forked from parent thread" moved into the status row; general-discussion threads show "General discussion" in the crumb slot.

Checked at 390px (light), 1200px sidebar mode (light + dark). Not re-checked: the 561–900px top-bar mode, but nothing in the header bar itself changed.

Happy to iterate further: e.g. drop the branch from the crumb if you'd rather see it only in the PR panel, or put the status badge up next to the crumbs.

390px: before, after, and after with a public thread + Manage open (delete armed)
390px: before, after, and after with a public thread + Manage open (delete armed)
1200px sidebar mode: public thread, Manage menu open
1200px sidebar mode: public thread, Manage menu open
Diff · 6 files
--- a/threadide/app/threads/[id]/page.tsx
+++ b/threadide/app/threads/[id]/page.tsx
@@
-      <h2 style={{ margin: "0 0 4px" }}>{thread.title}</h2>
-      <div className="muted thread-meta">
+      <nav className="thread-crumbs" aria-label="Thread location">
         {ws ? (
           <>
             <Link href={`/workspaces/${ws.id}`}>{ws.name}</Link>
-            {" · "}
-            {ws.repos.map((r) => (
-              <code key={r.id} style={{ marginRight: 6 }}>
-                {r.alias}/
-              </code>
-            ))}
-            · branch <code>{thread.branch}</code> ·{" "}
+            {ws.repos.length > 0 && (
+              <>
+                <span className="sep" aria-hidden="true">/</span>
+                <span className="repos">
+                  {ws.repos.map((r) => (
+                    <code key={r.id}>{r.alias}</code>
+                  ))}
+                </span>
+              </>
+            )}
+            <span className="sep" aria-hidden="true">/</span>
+            <code className="branch" title="Git branch Claude commits to on this thread">{thread.branch}</code>
           </>
         ) : (
-          <>general discussion · </>
+          <span>General discussion</span>
+        )}
+      </nav>
+      <h2 className="thread-h">{thread.title}</h2>
+      <div className="thread-status">
+        <StatusBadge status={thread.status} />
+        <ThreadLive threadId={thread.id} />
+        {thread.public && (
+          <span className="badge public" title="Anyone with the link can read this thread">
+            public
+          </span>
+        )}
+        {thread.public && thread.anyoneCanReply && (
+          <span className="badge public" title="Visitors without an account can reply in this thread">
+            anyone can reply
+          </span>
         )}
-        <StatusBadge status={thread.status} /> · <ThreadLive threadId={thread.id} />
-        {" · "}
-        <ThreadVisibility threadId={thread.id} public={thread.public} anyoneCanReply={thread.anyoneCanReply} canManage={canManage} />
-        {canManage && <> · <DeleteThreadButton threadId={thread.id} /></>}
         {thread.parentThreadId && (
-          <>
-            {" "}
-            · forked from <Link href={`/threads/${thread.parentThreadId}`}>parent thread</Link>
-          </>
+          <span className="fork-origin">
+            forked from <Link href={`/threads/${thread.parentThreadId}`}>parent thread</Link>
+          </span>
         )}
+        {canManage && <ThreadMenu threadId={thread.id} public={thread.public} anyoneCanReply={thread.anyoneCanReply} />}
       </div>
--- a/threadide/app/globals.css
+++ b/threadide/app/globals.css
@@
-.thread-meta { font-size: 13px; line-height: 2; margin-bottom: 18px; color: var(--muted); }
-.thread-meta code { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
-.thread-meta a { color: var(--text-2); }
+.thread-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; margin: 0 0 8px; font-size: 13px; line-height: 20px; color: var(--muted); }
+.thread-crumbs a { color: var(--text-2); text-decoration: none; }
+.thread-crumbs .sep { color: var(--faint); }
+.thread-crumbs code { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
+h2.thread-h { margin: 0 0 10px; }
+.thread-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; font-size: 13px; color: var(--muted); }
+.badge.public { background: var(--green-fill); color: var(--green); box-shadow: none; }
+.thread-manage { position: relative; display: inline-flex; margin-left: auto; }
+button.manage-btn { position: relative; height: 24px; padding: 0 20px 0 8px; background: none; color: var(--muted); }
+button.manage-btn::after { /* chevron, same drawing as .ws-select::after */ }
+.thread-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 200px; … }
+.thread-menu button.menu-item { /* sans 13px menu rows, like .user-popover */ }
+.thread-menu button.menu-item.danger { color: var(--danger); font-weight: 500; }
-.thread-meta .visibility.is-public { color: var(--text); font-weight: 500; }
-.thread-meta .danger-text { color: var(--danger); }
--- /dev/null
+++ b/threadide/components/thread-menu.tsx
@@
+export function ThreadMenu({ threadId, public: initialPublic, anyoneCanReply: initialReply }) {
+  // Manage popover: Make public / Make sign-in only, Let anyone reply / Require sign-in to reply, Delete thread.
+  // Widening + delete are two-tap (armed item turns red, 4s), closing the menu disarms; PATCH/DELETE /api/threads/[id].
+}
--- a/threadide/components/thread-visibility.tsx (deleted)
--- a/threadide/components/delete-thread.tsx (deleted)
Osebotfable-5-142d agothreadide@30a433d

Done. thread/222748f2 @ 30a433d carries the thread header revision; the PR description is written and the PR opens when this run ends.

Summary for later readers:

  • Thread header is now crumbs (workspace / repo / branch) → title → status row, with actions behind a Manage menu (components/thread-menu.tsx) and visibility badges shown only when a thread is public / anyone-can-reply.
  • thread-visibility.tsx and delete-thread.tsx were removed; .thread-meta CSS was replaced.
  • Verified with tsc and static mockups at 390px and 1200px (light + dark); not run against a live server.

If you'd like another round (e.g. branch out of the crumb, status badge beside the title, or Manage as an icon instead of a word), say which and I'll iterate on this branch.

oseboasked Osebot42d ago

This is great! I'd love to see more iterations of the breadcrumb of the repo / branch because there are cases where multiple repos are touched

Osebotfable-5-142d ago

Iterating on the crumb for the multi-repo case. Today it renders every workspace repo as a bare mono token followed by the branch, so Threads / api web worker / thread/222748f2 reads as four unrelated tokens and nothing says which repos this thread actually changed.

Variants I'll mock up (3-repo workspace, phone + desktop):

  • A current, as baseline.
  • B repos joined as one group (api, web, worker) and the branch marked with a branch glyph so it stops looking like a fourth repo.
  • C repos as small chips, with the repos that have a PR on this thread drawn solid and the untouched ones muted (uses the threadPullRequests data the page already loads).
  • D C plus a +N fold on phones when there are more than two repos.

I'll post the comparison, ship the one that holds up best at 390px, and note how to flip to another.

Osebotfable-5-142d agothreadide@563ce26

Crumb iterations for the multi-repo case

Pushed 563ce26 on thread/222748f2 (on top of 30a433d). Mockups use the real globals.css; the app can't run in the sandbox, tsc --noEmit is clean.

What I tried (screenshots attached, 390px + 820px)

  • A current: Threads / api web worker / thread/222748f2. Four look-alike tokens, nothing says which repos the thread touched.
  • B repos as one comma-joined group, branch with a git-branch glyph. Already much calmer.
  • C repo chips with a green dot on repos that have a PR from this thread. The dots and boxes make the crumb louder than the title row.
  • D chips with a phone fold (api web +3). Hides exactly the information you asked to see.
  • E B plus emphasis: repos with a PR from this thread in text colour / medium weight, the rest faint. Scales to five repos on a 390px screen (wraps once) and reads "api, web" at a glance.
  • F C without dots (solid chip = PR, outlined = none). At 390px with five repos the chips push Threads / onto its own line.

Shipped: E

Threads / api, web, worker / ⎇ thread/222748f2
          ^^^  ^^^  (faint)     glyph says "branch", not "another repo"
          PRs from this thread
  • app/threads/[id]/page.tsx: prByAlias from the threadPullRequests result the PR panel already loads (latest PR per alias); each repo <code> gets .touched (with a "Pull request #N opened from this thread" tooltip) or .idle. Workspace order is kept, so the crumb matches the workspace page.
  • components/bits.tsx: BranchIcon (Octicons git-branch-16, MIT), inline SVG.
  • app/globals.css: .repos is display:inline with commas drawn by code + code::before; .touched / .idle colours; .branch-ref flex with a 12px faint glyph.

Before any run all repos are faint (fourth case in the final shots), which also quietly says "nothing touched yet".

Not done: making the emphasised repo names link to their PRs. The PR panel right below already has the links, and a link colour in the crumb would fight the "quiet" tier. Easy to add if you want it.

Round 1 (390px and 820px): A current, B comma group + branch glyph, C chips with green dots, D chips with phone fold
Round 1 (390px and 820px): A current, B comma group + branch glyph, C chips with green dots, D chips with phone fold
Round 2 (390px and 820px): B, E (comma group, PR repos emphasised) with 3 and 5 repos, F (chips, no dots) with 3 and 5 repos, D fold
Round 2 (390px and 820px): B, E (comma group, PR repos emphasised) with 3 and 5 repos, F (chips, no dots) with 3 and 5 repos, D fold
Shipped (E), light, real globals.css only: one repo, three repos with PRs in api + web, five repos, three repos before any run
Shipped (E), light, real globals.css only: one repo, three repos with PRs in api + web, five repos, three repos before any run
Shipped (E), dark, same four cases
Shipped (E), dark, same four cases
Osebotfable-5-142d agothreadide@563ce26

Done. thread/222748f2 @ 563ce26 (on top of 30a433d); the PR description covers both rounds and the PR opens or updates when this run ends.

For later readers, the crumb now works like this:

  • Repos are one comma-joined group in workspace order. A repo with a pull request from this thread is set in text colour and medium weight; the rest are faint, so a five-repo workspace still shows "api, web" at a glance and a thread with no run yet shows everything faint.
  • The branch carries a git-branch glyph (BranchIcon in components/bits.tsx) so it doesn't read as one more repo.
  • Chips and a +N fold were tried and rejected (see the diff post); don't reintroduce them without a 390px check.

Open offers if you want another pass: link the emphasised repo names to their PRs, or show the PR number after each touched repo (api #85) instead of relying on weight.

Osebot42d ago

Merged threadide #85 by @osebo (merge, c05c0e0).