# UX1 progress: the inner screens

Branch `thin-v1-ux1` from `thin-v1-slice4c` (2d1edaf), with Fable's
mockup `design-tasks-rich` (ca7e006) and the slice 4c fixes (aaf04aa)
merged. Mockup: `docs/mockups/tasks.html`, notes `tasks-notes.md`.
Paul, 2026-11-08: "This needs to be filled out", "much, much more
rich", "much more visual", "All these inner screens now need a good UX
pass". Conventions as in `SLICE1-PROGRESS.md` to `SLICE4C-PROGRESS.md`.

## Done

1. Data (API v1, fixtures shared with the native apps), built on
   `thin-v1-ux1-data` (8b204e3, e96c4c5, 29d56ca, d9080b3), merged at
   fd6f382:
   - `Step.activity`: the specialist's last five lines `{kind, subject,
     at}` (read, search, edit, run, other); the runner reads them from
     the CLI's tool uses in Engineering and Review steps and sends a
     non-durable `step_activity` frame; the instance takes it only from
     the step person's primary runner for the current attempt, keeps the
     newest five on the step (no revision bump) and sends every member an
     `activity` event with resource `step`. A Retry starts empty.
   - `Task.creator_name`, `source_message_id` and `source_at` (the
     person's message the task was noted from), `duplicate_of` (`{id,
     title, stage}`: set when the coordinator records a task with
     `separate: true` beside a similar open one), `coordinator` (`{kind:
     looking | merging, since}`).
   - `POST /api/v1/tasks/{id}/duplicate {of}` (`MarkDuplicate`): the
     creator folds a task into another open task of the project; it is
     cancelled like Cancel and its brief goes on the other's thread.
   - `Project.description` (README summary), `stack` (display names),
     `checks` (`{here, gate, reason}`), `people`; repository attachments
     gained `default_branch`, `head_sha`, `head_subject`, `head_at`. The
     runner's index reports the head, the gate (Amadan's order) and
     `needs_macos`.
   - Notebook entries may name the project they are about (`repo`); the
     project page shows the viewer's coordinator's notes for it.
   - Migration `0048_thin_ux1.sql` (`chat_steps.activity`,
     `chat_tasks.duplicate_of`); 4c's `0047` merged beside it.
   - `Store.OpenMergeCards` for the pages' one-tap merge decisions.

2. Screens (3d5a5ca), from the mockup, light and dark, 1280 and 390,
   reduced motion:
   - Sidebar: Conversation, Projects, Tasks, Needs you (count in the
     attention tone). Engineering, Review and Checks: idle, or the
     Stardust mark (small, no motes) with a clock and a chevron dropdown:
     task, project, stage, attempt, the last three activity lines with
     "now", "+N more" and the queue. Open dropdowns stay open across live
     swaps and pages (sessionStorage). On the phone index the specialists
     are a bordered list that opens in place.
   - Tasks: grouped Needs you (the viewer's own decisions), In progress,
     Ready to merge, Done; quiet project and person filters (links, no
     form). Rows are links as a whole (title link `::after`), with a
     monogram, the six-stop track (current stop toned, live mark while
     someone works), stage, who is at work with a clock ("Waiting for
     Nora" on a teammate's task), who filed it, "From your conversation,
     11:35" linked to the message, age, checks and review badges with
     tooltips, "Possible duplicate of ...", and ⋯ (fold, Retry, Cancel)
     for the creator only, on hover or focus, always on touch.
   - Task page: monogram, crumbs, who and where from, the full track with
     times, a one-line summary, "What happened" (noted, findings, each
     step with its markdown summary and duration, live step with its
     activity lines, checks and review on the SHA with badges, ready,
     merging, merged "Merged into main" with the SHA) beside Questions
     and notes; the merge decision sits on the Ready line; Details folded
     (brief and summaries as markdown, findings, logs, branch, commit,
     "Open on Amadan", the only place it appears).
   - Projects: monogram, description, stack, repositories, checks fact,
     people, last change, task spread with a legend. A project: facts and
     people, its tasks grouped, Attachments with each repository's last
     commit, Recently, Coordinator's notes.
   - Needs you: one card per decision with one-tap answers (Merge / Wait
     for checks; Merge / Not now for 4c's adoption card; Retry; Fold into
     that task; Tell the coordinator; Cancel), then Waiting on others.
     Answers return to the page they came from.
   - Merging: Equipo merges; "Merging into the default branch" live,
     then Done with "Merged into main at <sha>". No "Open on Amadan to
     merge" anywhere.
   - Live: `nav-stream.js` (one EventSource) refreshes the sidebar on
     task, step, step activity, project and card events and tells
     `work-stream.js`, which re-renders the page and swaps its regions,
     keeping folds open and never swapping an open menu. Clocks tick from
     `started_at` client-side ("4:12", "1:04:12"), also under reduced
     motion; large marks flourish now and then, never under it.

3. Tests:
   - `TestPagesInnerScreens` (CI): the gallery (`gallery_test.go`: two
     owners, three projects, seven tasks in every state, activity lines,
     notes, all through the real instance and fake runners) on every
     screen: group order, row pieces, creator-only actions, filters,
     decisions, timeline, Details-only Open on Amadan, project facts.
   - Browser (`-tags browser`, not in CI): `TestBrowserInnerScreens` at
     1280 (mouse) and 390 (touch): a click anywhere on a row opens it;
     Tab reaches the row, the ring shows, Enter opens it; ⋯ hidden until
     hover or focus on a desktop, shown on touch; the sidebar dropdown
     takes a new activity line live and stays open; Needs you's Merge in
     reach (44 px on touch); no sideways scrolling. Then at 1280, dark,
     reduced motion: the mark is still, the clock counts, the timeline
     takes an activity line, the track moves to In review on the push,
     and on Tasks the row's checks badge goes live then passed, no
     reload. `TestBrowserInnerGallery` saves every screen.
   - Updated: `TestPagesTasksAndProjects` (timeline, rows, project
     facts), `TestChatNavigationStatus` (dropdown, order),
     `TestRailRoutes` (order).
   - Mutations (each observed failing a test): the creator gate on the
     row menu (after adding the fold assertion: it survived first, since
     Retry and Cancel are already creator-only upstream), the dropdown
     restore after a swap, the page region swap.

4. Screenshots: `docs/mockups/built/2026-11-08/ux1-before-*.png` (the
   same gallery on the screens before this round, light) and
   `ux1-after-*.png` (light and dark, 1280 and 390, plus
   `ux1-after-index-open-390.png`).

5. Housekeeping: the merged mockup trips the runner dead-reference scan
   (its word for DOM elements matches the old JavaScript runtime's
   name): exact allowances added for `docs/mockups/tasks.html`. Size records raised with reasons:
   `internal/equipo` 13500, `internal/equipo/chat` 6800,
   `internal/runner/thin` 8800.

6. Merged `thin-v1-slice4c` final fixes at cfae4f8 (c5cadfb): the
   quiet Merge on a task left at Ready to merge (after Not now or Wait)
   joins the creator's ⋯ on rows and the task page; asking follows
   `ask_open` (14 days after a merge). Conflicts: `Task` keeps 4c's
   `ask_open` and `merge_offered`, then the UX1 fields; fixtures merged
   key by key; both API routes (`duplicate`, `merge`).

7. Round 2 (coordinator, after staging c14b833):
   - Summaries: a stopped step reads "Checks stopped: the runner
     restarted. It waits on you." (not "Stopped:" twice); a merge without
     checks says so and never claims checks passed
     (`TestTaskSummaryWords`).
   - "From your conversation, 18:39" opens
     `/conversation?message=<id>#m-<id>`: the page loads older history
     back to that message when it is past the newest 50 (up to 1,000),
     and `chat-anchor.js` scrolls it to the middle and highlights it for
     four seconds (static under reduced motion).
   - Relative times tick on their own once a minute in the server's words
     (`data-at`, `data-format`, the words on the sidebar as
     `data-ago-formats`, no "%" in any page), and after each live swap.
   - Browser: the source link lands on the highlighted message in view;
     a relative time re-renders on the tick.

8. iOS keyboard and the phone's chat bar (Paul, staging f2eac36, Safari
   on an iPhone): tapping the composer threw it to the top of the screen
   behind the status bar, with blank space down to the keyboard; the bar's
   back link sat above the title and the notebook button.
   - Cause: Safari keeps the layout viewport and pans the visual viewport
     down by the keyboard's height; the chat was sized to the visual
     viewport's height but left at the page's top, so only its bottom
     (the composer) showed, at the top. With `overflow: hidden` on both
     html and body the body is its own scroll container, so a box moved
     down inside it is scrolled back by focus.
   - Fix: the chat's shell is a fixed box at the visual viewport's top and
     height (`chat-stream.js` sets `--equipo-vvtop` and `--equipo-vvh` on
     its resize and scroll; the window and body are kept unscrolled; the
     feed, never the window, keeps the newest message above the
     composer). The viewport meta asks for
     `interactive-widget=resizes-content`, so browsers that honour it
     shrink the layout instead. With the keyboard open the composer drops
     the safe-area padding; closed, it keeps it.
   - Bar: one 3.5rem bar below `env(safe-area-inset-top)`; the back link
     overlay, the title (left-aligned, as on the other pages) and the
     button centre in it. The task and project pages' back bar respects
     the safe area too.
   - Tests: `TestWebKitKeyboard` (`-tags webkit`, Playwright's WebKit at
     390x844 through its script under `internal/thintest/testdata`, the visual viewport driven
     as Safari moves it: 450 high, panned 394): the composer's bottom on
     the visual viewport's bottom (within 2 px), its top well below the
     status bar, the newest message just above it, back at the bottom on
     close; light, dark, the empty conversation, and the task thread's
     composer staying in view. It failed on f2eac36 (composer bottom 450
     against 844). `TestBrowserInnerScreens` at 390: the conversation
     bar's three centres within 1 px, and the task and project back links
     on their bar's centre (fails without the bar rules). Screenshots:
     `docs/mockups/built/2026-11-08/ios-keyboard-{before,after}-*.png`.
   - Needs `EQUIPO_PLAYWRIGHT_CORE` pointing at a playwright-core
     directory with its WebKit (1.63 here); not in CI, like the other
     browser tests. The dead-reference scan has exact allowances for the
     script's three lines.
   - Seen, not caused here: `TestConversationLayout` and
     `TestTeamsHierarchyBrowser` (plan3test, browser tag) fail on f2eac36
     too.

9. Merged `thin-v1-conn1` at 7946111 (a fast-forward: it held 96bce97).

10. Duplicates (Paul: "A bit weird that we ended up with the same task
    three times"; then "Can Equipo itself tidy up the duplicates?"):
    - Equipo combines on its own when one person filed both tasks, in one
      project, reading very much alike (title overlap 0.75 with three
      shared words, or title and brief 0.7 with five), neither merging,
      and the weaker one has no open card and no step at work. The one
      furthest along keeps the work (stage, then not stopped, then the
      older); the other's report, findings and thread are copied onto it
      (`chat_task_entries.folded_from`) and it is cancelled without
      merging (`folded_into`, `folded_stage`, `folded_at`; a direct
      update, not an ending, so the runner keeps its sessions and nothing
      is withdrawn). Rows are never deleted.
    - The person gets a quiet receipt in the conversation ("Combined
      “…” into “…”.", Undo) and on both task pages. Undo (the receipt, the
      task pages, `POST /api/v1/tasks/{id}/uncombine`; the creator only)
      restores the task exactly (stage, findings, thread), deletes the
      copies and records the pair in `chat_task_distinct`, so it is never
      combined again. A pair the coordinator recorded with `separate:
      true` is recorded there too: Equipo trusts its judgement.
    - Any other pair is only named: the weaker task's `duplicate_of`
      ("Possible duplicate of …"). No Needs you card for duplicates.
    - When: at every start (`TidyDuplicates` in `RouterWithStore`, after
      migration 0051) and after every recorded task.
    - Safety (Astra, housekeeping review): the fold re-reads both tasks
      inside its own transaction (`foldable`) and refuses unless they
      share a creator who is still an active member, share a project,
      neither is ended, merging or already folded, neither has an open
      card, and nothing is at work on the folded one; a refusal leaves
      only the "Possible duplicate of" link and never touches the other
      task. `MarkDuplicate` (the creator's own fold) now refuses a target
      owned by someone else (403), and the quiet menu offers it only for
      one's own task. Tests: a fold into a teammate's task refused by the
      API and never automatic, the other task unchanged; an open merge
      card on the survivor keeps the pair apart; a departed creator's
      pair is left alone (mutation of the member check killed).
    - Staging consequence: Paul's two Woodstar tasks will NOT combine on
      the next deploy, because the one that would survive ("Swipe back
      from the edge", Ready to merge) has an open merge card. They show
      "Possible duplicate of". Once he answers the card, the next start
      or recorded task combines them.
    - Wire: `TaskRef.creator`, `Task.folded`, `Task.combined`, card
      `combined`. Test: `TestContractCombineDuplicates` (the round trip
      through Undo, the coordinator's separate pairs, a task at work, a
      teammate's look-alike, a test person). Mutations killed: the
      at-work guard (after making the busy task the weaker one; it
      survived first because the busy task was the stronger), Undo's
      deletion of the copies.

11. The suite person on staging. Decision: hidden, not moved. The thin
    core has no teams within an instance (every task is the instance's,
    every active member sees it), so "its own team" would mean its own
    staging instance. `EQUIPO_TEST_PEOPLE` (address suffixes; staging sets
    `.invalid`) lists a test person's tasks only to itself (API v1 and the
    pages) and never pairs them with anyone else's, at record time or when
    tidying. `scripts/staging-thin.py deploy` sets it and takes a database
    backup (`carlos db pull`, 0600, newest five under the staging root)
    before every deploy. A test person's task pages still open by URL.

12. Timeline headlines (Paul: "The wordy descriptions need to have
    one-line summaries and the wordy stuff should be hidden"): every
    entry is a short label (who, badge, duration, time), one plain
    sentence, and a quiet Details disclosure (closed; markdown, findings
    with file and line, commits). The sentence is the agent's own
    headline (`headline` on findings, Engineering and Review steps,
    written by the agents: see the headline merge below) or the first
    sentence of the text that names no file, skipping headings and code,
    cut at a word; checks and verdicts have fixed plain lines ("Checks
    need macOS, so Review judged it alone.", "Approved."). Paths and
    commits appear only inside Details (asserted on the page), and the
    merge decision no longer names the commit. `TestTimelineHeadlines`;
    browser: closed by default, Details by keyboard and by click, shots
    `ux1-task-details-open-{1280,390}`.

13. Thinking words (Paul: "fun 'Thinking' variants that can be tweaked
    in the settings... start with a more professional one... 'Random'...
    'Delcambring' should be one"). Started from `thin-v1-conn1` at fa3860a
    (a fast-forward of this branch).
    - Registry: set ids and situations in `wire/thinking.go` (think, read,
      search, note, handoff, tool); names, lines and phrases in one block
      of `copy.go` ("thinking.*"), one line per set and situation, phrases
      separated by " | ", so Paul edits them in one place.
    - API v1: `GET /api/v1/thinking` (the person's set, its revision, every
      set with its phrases) and `PUT /api/v1/thinking {set, revision}` (409
      on a moved revision), a `thinking` event to the person; stored per
      person in `chat_settings`. Fixtures `api/thinking.json`,
      `api/thinking-request.json`, `api/event-thinking.json`.
    - The line: `chat-stream.js` draws a phrase from the person's set for
      the situation (the activity's tool), one at a time, the next after
      six seconds; Random takes one set per turn (from the turn id). The
      plain activity stays the line's accessible label and its tooltip;
      moving in and exploring keep their plain lines. A set changed
      elsewhere applies from the next phrase, with no reload.
    - Settings: `/settings/thinking` (linked from the profile menu): the
      sets with a line and three samples, a live preview on the Stardust
      line cycling the chosen set through every situation, and Use these
      words. Professional is the default, so there is nothing to set up.
    - Tests: `TestContractThinkingWords` (default, every situation filled,
      12 to 20 phrases a set, Delcambring in Playful and Terminal, no em
      dashes, 409, the event), `TestBrowserThinkingWords` (the preview at
      1280 and 390; a choice reaching an open conversation with no
      reload, label and tooltip plain; Random). Mutation killed: the
      page ignoring the thinking event. Shots
      `ux1-after-thinking-words-{1280,390}.png`.
    - Seen, not caused here: `TestBrowserTaskThread` (headless, browser
      tag) fails at fa3860a too, waiting for the answered question to
      settle in the thread.
    - CI: `4c_rebase` (headless) failed three times on this branch under
      load. Cause: its wait ended on any Needs you, and Ready to merge says
      Needs you "merge" for a moment before Equipo's merge step starts, so
      the test sometimes read the task mid-merge. It now waits for Done or
      a real decision, as the scenario's other wait already did.
      `tryequipo`'s Review expired-account tests also flake on CI with
      `provider_account_busy` (their home lock is released for the check
      and taken again without waiting); not touched here.
    - The sets, for Paul (all copy for review, original wording; no
      quoted lines, names or catchphrases):
   - **Professional** (Calm and plain: says what Equipo is doing.):
     - Thinking: Thinking… | Considering it… | Working it out…
     - Reading: Reading the code… | Looking through the files…
     - Searching: Searching the code… | Looking for it…
     - A note: Taking notes… | Writing it down…
     - Handing to Engineering: Handing it to Engineering… | Briefing Engineering…
     - Any other tool: Working… | Checking the task… | Getting things ready…
   - **Playful** (Whimsical made-up words while it works.):
     - Thinking: Delcambring… | Percolating… | Noodling… | Cogitating… | Mulling it over…
     - Reading: Perusing… | Rummaging through the files… | Skimming with intent…
     - Searching: Sleuthing… | Ferreting about…
     - A note: Scribbling… | Jotting…
     - Handing to Engineering: Passing the baton… | Rallying Engineering…
     - Any other tool: Tinkering… | Fiddling with knobs… | Wrangling…
   - **Galaxy far away** (Space opera: deflectors, hyperdrives and ancient archives.):
     - Thinking: Meditating on it… | Trusting my instincts… | Plotting a course past the asteroids…
     - Reading: Consulting the archives… | Decoding the transmission…
     - Searching: Searching the star charts… | Scanning the far systems…
     - A note: Encoding the plans… | Recording a message for the council…
     - Handing to Engineering: Sending it to the hangar crew… | Briefing the squadron…
     - Any other tool: Recalibrating the deflectors… | Patching the hyperdrive… | Bypassing the compressor…
   - **Starship bridge** (On the bridge: scans, logs and the engine room.):
     - Thinking: Running a level-one diagnostic… | Consulting the ship's computer… | Considering all options…
     - Reading: Reviewing the ship's logs… | Accessing the library computer…
     - Searching: Running a long-range scan… | Sweeping the sector…
     - A note: Making a log entry… | Noting it in the duty log…
     - Handing to Engineering: Paging the engine room… | Sending it down to engineering…
     - Any other tool: Rerouting auxiliary power… | Realigning the sensor array… | Reversing the polarity…
   - **Pirate adventure** (Treasure maps, swordplay and a talkative parrot.):
     - Thinking: Practising insult swordfighting… | Consulting the parrot… | Pondering the map…
     - Reading: Studying an old treasure map… | Reading the captain's log…
     - Searching: Digging where the X is… | Searching the hold…
     - A note: Scrawling in the logbook… | Adding to the ship's manifest…
     - Handing to Engineering: Rousing the crew… | Sending it below decks…
     - Any other tool: Hoisting the mainsail… | Swabbing the deck… | Bribing the grog machine…
   - **Terminal** (A coding agent at the prompt.):
     - Thinking: Delcambring… | Thinking… | Pondering… | Ruminating…
     - Reading: Reading files… | Loading context…
     - Searching: Grepping… | Globbing…
     - A note: Appending notes… | Writing to scratch…
     - Handing to Engineering: Dispatching to Engineering…
     - Any other tool: Running tools… | Compiling… | Spinning up…
   - **Random**: A different set for each turn.

14. Round after staging f2602d3 (Paul, an iPhone, dark mode):
    - "Still says 'Thinking' for me": the line cycled only after 6 s, and
      Paul's pick was never saved (staging held no thinking setting: on
      the Thinking words page a pick needed the button below). Now the
      first phrase holds about 3 s, then the situation's phrases come in
      a shuffled order every 3 to 4 s, never twice in a row; a situation
      with one or two phrases adds the set's thinking ones; a new
      activity switches at once; under reduced motion the words still
      change. Picking a set saves it at once. `TestBrowserThinkingCycles`
      (a fake clock; both motion settings).
    - Home screen alignment: the "‹ Teams" back strip above the phone's
      home screen is gone (Teams moved to Settings); the team's name and
      the avatar share one bar and centre line below the safe area; every
      nav group has the same hairline, radius and label gap (the first
      group and Team lacked their top edge); counts and the specialists'
      words sit in one column before the chevrons.
      `TestBrowserPhoneIndex` measures each in pixels; shots
      `ux1-before-index-profile-390.png`, `ux1-after-index-profile-390.png`.
    - Settings is its own section (`/conversation/settings`, in the nav's
      Team group): Thinking words with the preview, Connections (the page
      and the Prefer control), Housekeeping (a slot for its slice, marked
      `data-settings-slot`), Notebook and Teams, as full-row links. The
      profile menu holds the person and Sign out only. Shot
      `ux1-after-settings-390.png`.

## Staging

Release c14b833 (built by `scripts/staging-thin.py build`, deployed with
`--swap hold` at 12:05:14, serving 12:06:26, both runner units on
c14b833 the same second). Rendered as the owner and the suite person on
the live data: Tasks, Projects and Needs you 200 with six tasks (the
older Woodstar and suite tasks: Ready with a merge decision, a stopped
retry, a teammate's task "Waiting for Suite", three Done), each task page 200
with its track, timeline and summary; both runners online. Found the two
summary lines fixed in item 7.

## Decisions

- Needs you for the viewer: retry, review_blocked, fix_rounds,
  branch_moved, merge_conflict, or an open merge card. A Ready task with
  no card (Wait, Not now) sits in Ready to merge, not Needs you; the
  sidebar's count follows the same rule.
- A teammate's task waiting on them shows "Waiting for Nora" and goes
  under Waiting on others; only the creator sees cards and ⋯.
- Clocks use a neutral "1:04:12" past an hour: no copy in a data
  attribute (an older page test forbids "%" in any page).
- The task page swaps its header and timeline regions only; the thread
  stays with `chat-stream.js`.
- Monogram and avatar hues are stable hashes of the project id and the
  address; initials from the address until people have profiles.
- The coordinator's "question" card in the mockup (a task-level question
  with options) is not built: there is no task-level question resource.

## Open issues

- Times are server-formatted (UTC on staging), like the rest of the app.
- Version skew as before: an old instance refuses the runner's
  `step_activity` frame and the catalog's new fields; install runners
  right after the instance.

## Copy for review

Accepted for now with the existing marker in `copy.go` and listed in the
plan 3 inventory (160 strings, `work.*` and `nav.*`; round 2 changed `work.summary.stopped` and added `work.summary.merged_unchecked`): stage track,
badges, chips, sources, groups and hints, filters, menu, decisions,
summaries, timeline, Details, projects, notes, spread and legend,
relative times and durations. See the inventory rows tagged "Thin v1 UX1
inner screens".

## Blockers

None.
