Public: anyone can read this; the crew can change it.
The browser tab says how many leads are waiting on the agent, and a lead's page is titled with the lead's name #63
Check · Review · Land · Live done — Landed and live in production.
The desk's browser tab now reads "(N) Speed to Lead" when N leads need the agent, and plain "Speed to Lead" when none do. I did not run the full suite, scripts/gate.ts or scripts/fast.ts, because they aren't in this clone.
shipped production is serving it deploy aba151a
The desk's browser tab now reads "(N) Speed to Lead" when N leads need the agent, and plain "Speed to Lead" when none do. I did not run the full suite, scripts/gate.ts or scripts/fast.ts, because they aren't in this clone. I ran src/server.test.ts, live.test.ts and design.test.ts, which pass, and readme.test.ts and openapi.test.ts, which also pass. The design lint ran, but I didn't check its output. bun x tsc --noEmit only printed tsc's help text (7.0.2, no tsconfig in the clone), so there was no type check.
- Same query: the count is the "needs you" figure from
countViews, the one the "Needs you" tab shows. It stays the same under?show=closedor a search. - Live update: the
#deskregion now carries its title in adata-titleattribute. Whenstatic/live.jsswaps that region after a lead arrives or is answered, it also setsdocument.titlefrom the new region. No new script file and no new inline script, so no layout shift and the CSP is untouched. - Signed out: the welcome page has no count and no
data-title. - Lead page: already titled "<lead name> · Speed to Lead", escaped, so I changed nothing there. I added a test with a name containing
<. - Tests:
src/server.test.tscovers the title for zero, one and several waiting leads. It also covers a real desk matching its "Needs you" count, a filtered view, the signed-out page, and the escaped lead title.
Not done:
- Pages other than the desk and the lead page (profile, activity) show no count. The issue asks only for the desk.
- If a signed-in person has the desk open and the update stream drops, the count refreshes on the existing reconnect catch-up, not sooner.
To try it: open / signed in, press "Bring in a new inquiry", and watch the tab title change without a reload.
🤖 Generated with Claude Code
Clean, small change. The desk title uses the same needs count as the Needs you view, live.js updates document.title from the swapped #desk region (no new script, no layout shift), signed-out pages carry no count or data-title, the lead page title is escaped, and no contract cell or write path is touched. Tests cover zero, one and several, the filtered view, signed-out, and the escaped name. Minor, non-blocking: the fallback to leads.filter(inView needs) in desk.ts would be wrong under a filtered list if counts were ever absent.
The desk's browser tab now reads "(N) Speed to Lead" when N leads need the agent, and plain "Speed to Lead" when none do. I did not run the full suite,
scripts/gate.tsorscripts/fast.ts, because they aren't in this clone. I ransrc/server.test.ts,live.test.tsanddesign.test.ts, which pass, andreadme.test.tsandopenapi.test.ts, which also pass. The design lint ran, but I didn't check its output.bun x tsc --noEmitonly printed tsc's help text (7.0.2, no tsconfig in the clone), so there was no type check.countViews, the one the "Needs you" tab shows. It stays the same under?show=closedor a search.#deskregion now carries its title in adata-titleattribute. Whenstatic/live.jsswaps that region after a lead arrives or is answered, it also setsdocument.titlefrom the new region. No new script file and no new inline script, so no layout shift and the CSP is untouched.data-title.<.src/server.test.tscovers the title for zero, one and several waiting leads. It also covers a real desk matching its "Needs you" count, a filtered view, the signed-out page, and the escaped lead title.Not done:
To try it: open
/signed in, press "Bring in a new inquiry", and watch the tab title change without a reload.🤖 Generated with Claude Code
Closes #56