# Proof audit pass 1 — final-head matrix amendment

Replacement [#24592](https://github.com/pingdotgg/t3code/pull/24592) for original [#20884](https://github.com/pingdotgg/t3code/pull/20884) ([GitCafe #20884](https://git.cafe/pingdotgg/t3code/pulls/20884)). This amendment supersedes the expanded required-coverage table in the [prior matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/bc1b22a2028d6bca/matrix.md). **Exactly three required rows remain. No final proof or merge verdict is issued in pass 1.**

## Immutable revision contract

- After: `takeover/pr-20884`, final head [3b6219c922](https://github.com/pingdotgg/t3code/commit/3b6219c922023fefca4a94a7887298dd8e4f36d7).
- Before: pinned initial merge-base [3cc31ed27c](https://github.com/pingdotgg/t3code/commit/3cc31ed27c8956b36cee35a50509fb7c6869592b). Capture must keep this baseline even after the main merge.
- Current comparison base: merged `origin/main` [843f4e3529](https://github.com/pingdotgg/t3code/commit/843f4e3529). It is distinct from the initial merge-base. Immutable diff of initial merge-base to this main commit contains no `apps/web` changes; the pinned web baseline remains comparable. The final PR delta against this main commit changes only the coordinator and its browser test.
- Previous matrix head: [78c35b4659](https://github.com/pingdotgg/t3code/commit/78c35b4659d09b78f227b04be3a8feca05a4321a). Original author background: `GLDRoger:fix/done-toast-keyboard-nav`, [137e5a64d9](https://github.com/GLDRoger/t3code/commit/137e5a64d99214459c2747e81464670bb6e0ab5a). Neither is the after revision for final proof.

Code was inspected solely with immutable `git show` / `git diff` in `/home/ubuntu/wt/pr-20884`. Its checked-out files are not evidence of either capture revision and were not changed. No checkout, tests, browser, server, push, comment or PR watch was performed in this amendment.

## Required matrix — unchanged focus

Q = 1440×900 light, 1440×900 dark, 390×844 light, 390×844 dark; CSS pixels, 100% zoom, actual app theme. R1–R3 × Q = **12 paired cells**, each requiring matching before and final-head evidence. Continuous recordings establish interaction and timing; stills supplement them. Chapters may share recordings if identities, rearming and transitions remain clear. Responsive Chromium establishes web behavior, not native mobile or Electron OS behavior.

| Row | Required chapter | Visible assertions, matched before → after |
|---|---|---|
| R1 | Completion via keyboard and sidebar, with independent B | While C is selected, create live completion notifications for A and B. Show actual resolved next/previous thread keyboard navigation to A, then a separately rearmed plain sidebar selection of A (real sidebar sheet at 390). Before: A toast persists after selection. After: A closes on opening A, B remains live. Show destination title/selected sidebar identity; leave/return without resurrecting A. Preserve both navigation paths inside this row. |
| R2 | Representative attention and multiple notifications for A, with B; lifecycle assertion in this same chapter | Generate a representative real attention transition for A and multiple A notification IDs while A is not selected; preserve an independent live B notification. Show the attention label and corresponding actual pending UI where applicable. Opening A must close every remaining live A notification, retain B and retain the pending interaction when attention is still outstanding. Before: remaining A notifications persist. Include manual dismissal of one A notification before reopening A, with other A IDs still live: after reopening, those remaining IDs close and the manually dismissed one does not resurrect. Rearm within this chapter if needed to show both multiple-live-ID dismissal and manual-close cleanup. Expand the stack normally when necessary; expiry must not masquerade as route dismissal. |
| R3 | Effective promoted draft suppression and dismissal | Establish the real effective D→A promoted draft while the route still identifies the draft; show route identity and rendered A together. Suppression: a new A transition while effectively viewing A creates no self-toast after the fix; B can still notify. Dismissal: an already-live A toast closes on entering that effective promoted draft, B remains. Before can self-notify/preserve A. A canonical server-thread route alone does not prove this row. Clearly label any narrow promotion/route-timing boundary fixture and distinguish it from the actual user/provider path. |

No new mandatory rows or separate surface are introduced for failure/limit variants, every attention subtype, generic toast controls, settings, OS badge/sound/delivery, reconnect, same-ID environments, provider permutations or native clients. Their existing behavior does not expand this focused proof request. B is the required selective-dismissal control within the existing chapters.

## What the final cleanup changes

Compared with the prior head, the coordinator now stores `Map<ThreadId, Set<ToastId>>` rather than arrays. Each toast's `onClose` deletes its ID and removes the thread entry when empty; adding another ID mutates the Set instead of copying the accumulated array. Opening the effective thread still closes its tracked IDs and deletes the entry. The final browser test explicitly calls the first toast's close callback and asserts only the remaining completion ID is closed on thread opening.

This supports the code-level claim that close callbacks remove closed IDs and avoid accumulating them or repeatedly copying arrays. It does **not** itself establish actual toast-provider callback timing, visual behavior or heap measurements. The manual-dismissal sequence belongs inside R2, not a fourth row. Code inspection found no change to R1/R3 acceptance criteria or viewport/theme combinations.

The reported 10 passing tests and two new independent MERGE reviews are supplied context, not independently rerun or revalidated by this read-only pass. They do not substitute for final-head recordings.

## Evidence handoff and limits

Capture owns baseline repair and the final 12 paired cells. Do not overwrite its scripts, manifests or recordings. Keep the same synthetic inputs, settings, theme, viewport, focus and notification lifetime across each pair. Establish a live history baseline before generating transitions; startup historical data alone cannot prove notification delivery. Show B surviving beyond the route transition so natural expiry or collapsed-stack hiding cannot be mistaken for selective dismissal. Keep tokens, pairing links and real conversations out of artifacts.

The [existing partial index](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/02928052a9b6d5dc/index.md) is explicitly partial (7/12 baseline cells). It is not complete final-head proof. Pass 2 must inspect the capture operator's final artifacts and revision manifest, map them to all 12 paired cells, and verify R2's lifecycle sequence before issuing any proof verdict. No visual result is claimed here.

## FRICTION

| Friction | Consequence / handling |
|---|---|
| Stale planning scope | Prior uploaded matrix still lists many mandatory rows. This amendment explicitly replaces that table with R1–R3 only. |
| Main merge changes base identity | Keep initial merge-base as before and final merge head as after; label current main separately. No web changes between the two bases were found. |
| Closed-ID cleanup added after old matrix | Add manual close then reopening within R2. No extra surface, row or viewport multiplication. |
| Partial capture index | Existing 7/12 baseline artifact cannot support a final verdict; await repaired baseline and final-head 12-cell handoff for pass 2. |
| Timing / transient draft | Use continuous evidence, independent B and explicit draft identity; label boundary fixtures honestly. Do not silently substitute expiration or canonical-route navigation. |

Status: final-head planning amendment complete; required rows unchanged (R1–R3), R2 lifecycle assertion clarified. Final proof verdict deferred to pass 2.
