oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Chat UI controller report
2
3Branch: `chat-ui`, starting at `df2b9e3` (the brief, on deployed `0cb576b`).
4No deployment or default-branch changes.
5
6## Gaps captured before implementation
7
8- Messages read like paragraphs in a document. Senders had the same layout,
9 with no timestamps or specialist icons.
10- The composer followed the whole document and disappeared below the fold.
11- Task cards followed all messages, separate from the messages that introduced them.
12- Task threads lacked their task's steps and pending questions.
13- Sending used a page navigation. There was no Enter/Shift+Enter chat behavior.
14- The navigation counts wrapped onto several lines.
15
16## Changes
17
18Both conversation views now use one scrolling column and a docked composer.
19Your messages have a tinted bubble aligned to the right. Other people,
20coordinators and specialists appear on the left, with an icon, name and time.
21Task threads use the task description as their heading.
22
23Cards sit in message order. Tasks include their steps, model/account labels,
24links to their thread and plan, candidate evidence and existing approval actions.
25Pending questions can be answered from their cards. Existing authorization and
26form handlers remain responsible for those actions.
27
28The composer uses Rastrillo live forms. Enter sends, Shift+Enter adds a newline,
29and composition input is left alone. The send button is disabled while the
30request is pending; the textarea becomes read-only so it can retain focus.
31Confirmed sends clear the draft and return focus to the composer. Background
32updates preserve drafts. The feed follows new messages at the bottom and keeps
33the visible message in place while reading older messages, including when the
34server's 50-message window moves forward. Message and card scroll identifiers
35remain distinct even when their stored IDs match.
36
37The ordered message list, focusable scroll region and persistent live announcement
38region support keyboard and assistive-technology use. Phone navigation retains
39the existing index and back links. Styling uses theme tokens and complete borders.
40Vendored assets are unchanged. No framework or schema changes were needed.
41
42Browser fixture helpers for screenshots and real-session sign-in are shared to
43stay within the existing source and test size budgets. The old layout assertion
44now checks for one column; the foundation walk checks the conversation's empty
45state rather than assuming the first navigation destination is empty.
46
47## Screenshots
48
49The app ran through the repository's Chromium harness, bound to loopback, with
50logged-mail mode allowed, a scratch database, and a real verified session. The
51fixture contains a team, project, six messages in each conversation, a task with
52steps and a pending question. Both sizes are 900 pixels high.
53
54All files are under `docs/mockups/built/2026-11-05/`:
55
56| View | Before | After |
57|---|---|---|
58| Conversation, desktop | `before/conversation-1280.png` | `after/conversation-1280.png` |
59| Conversation, phone | `before/conversation-390.png` | `after/conversation-390.png` |
60| Task thread, desktop | `before/thread-1280.png` | `after/thread-1280.png` |
61| Task thread, phone | `before/thread-390.png` | `after/thread-390.png` |
62| Navigation, desktop | `before/nav-1280.png` | `after/nav-1280.png` |
63| Navigation, phone | `before/nav-390.png` | `after/nav-390.png` |
64
65Reference captures are `mockups/{conversation,nav,journey,native}-{1280,390}.png`.
66The phone reference captures scroll to the phone drawing. The built chat opens
67at its newest messages; the before version opens at the top of the document.
68Before and after captures use the same seed without browser-test replies.
69Additional `after/{conversation,thread}-history-{1280,390}.png` captures show
70the task steps near the start of each feed. These use `EQUIPO_CHAT_HISTORY=1`.
71
72Capture command, with `EQUIPO_BROWSER_ARTIFACTS` pointing to the appropriate
73scratch directory: `EQUIPO_ALLOW_LOGGED_MAIL=1 EQUIPO_CHAT_BASELINE=1
74GOTOOLCHAIN=go1.26.10 CGO_ENABLED=0 go test -tags browser ./internal/equipotest
75-run '^TestChatBrowser$' -count=1`. The baseline flag captures without asserting
76the new behavior, so the same fixture runs on the original UI.
77
78## Verification
79
80The first `TestChatBrowser` run failed with `missing accessible chat feed` before
81implementation. The long-history acceptance check also failed before its fix.
82
83- `GOTOOLCHAIN=go1.26.10 CGO_ENABLED=0 go test ./internal/equipo/conversation -run '^TestChatFeed$' -count=1`: passed.
84- `GOTOOLCHAIN=go1.26.10 CGO_ENABLED=0 go test -tags browser ./internal/equipotest ./internal/plan3test -run '^(TestChatBrowser|TestFoundationBrowserWalk|TestRunnerTaskBrowserWalk|TestConversationLayout|TestTeamsHierarchyBrowser)$' -count=1`: passed. Includes both widths, 200% text, live messages and task progress, draft/focus retention, scrolling, keyboard sends and navigation.
85- `EQUIPO_BROWSER_NO_JS=1 GOTOOLCHAIN=go1.26.10 CGO_ENABLED=0 go test -tags browser ./internal/equipotest -run '^(TestChatBrowser|TestFoundationBrowserWalk|TestRunnerTaskBrowserWalk)$' -count=1`: passed.
86- `make -k ci`, first run: reference-inventory and project-correction-link failures. Both were fixed. Build, vet, formatting, static analysis, vulnerability and secret scans, size budgets, adapter checks, containment checks, migration and performance checks passed. Some unchanged execution packages exceeded advisory local timing budgets under load.
87- `GOFLAGS=-p=2 make -k ci`, final run: **exit 0**. All 31 tested packages passed uncached. Adapter, containment, migration and both required performance checks passed. Two full gate runs were made in total.
88
89The final full test step took 15m53.465s with two Go packages running at once.
90Seven package timing limits were exceeded during this shared-machine run. These
91are advisory locally and enforced on CI; a successful local exit does not certify
92those timing limits. No limits were increased.
93
94| Package | Observed | Limit |
95|---|---:|---:|
96| `internal/directlive` | 6m21.935s | 6m |
97| `internal/equipotest` | 5m8.902s | 5m |
98| `internal/runner` | 9m25.809s | 5m30s |
99| `internal/runner/containment` | 15.385s | 15s |
100| `internal/runner/provider` | 35.284s | 15s |
101| `internal/runner/provider/claude` | 1m12.855s | 45s |
102| `internal/runner/provider/codex` | 1m0.805s | 35s |
103
104Seventeen mutations were applied separately, tested, then restored. Every
105mutation failed its guard. Unit mutations used `go test ./internal/equipo/conversation
106-run '^TestChatFeed$' -count=1`; browser mutations used `go test -tags browser
107./internal/equipotest -run '^TestChatBrowser$' -count=1`, except the two history
108cases, which used `./internal/plan3test -run '^TestConversationLayout$'`.
109All commands used `GOTOOLCHAIN=go1.26.10 CGO_ENABLED=0`.
110
111| Deliberate breakage | Observed failure |
112|---|---|
113| Remove retained older messages | Message being read disappeared |
114| Treat message and card IDs as interchangeable | Visible message moved |
115| Reverse feed ordering | Cards detached from messages |
116| Style every person as the current viewer | Identity assertion failed |
117| Substitute a specialist key for its name | Identity assertion failed |
118| Select answered questions instead of pending ones | Thread-card assertion failed |
119| Ignore task lookup errors | Denied lookup was hidden |
120| Remove the ordered list | Accessible-feed assertion failed |
121| Remove machine-readable timestamps | Message-times assertion failed |
122| Remove viewport height | Composer left the viewport |
123| Remove the feed's live subscription | Live-message wait timed out |
124| Clear the draft on live updates | Draft/focus assertion failed |
125| Stop following the bottom | Bottom-follow assertion failed |
126| Always jump to the bottom | Reading-position assertion failed |
127| Suppress live announcements | Announcement assertion failed |
128| Send on Shift+Enter | Newline assertion failed |
129| Remove Enter submission | Sending-state wait timed out |
130
131The reference inventory has exact allowances for the supplied brief's excluded
132path, DOM properties and the reused isolation-disclosure partial. No broad
133allowances or size-budget increases were added.
134
135## Copy and handoff
136
137New app-owned runtime strings: **none**. Existing strings are reused. Fixture
138messages and labels are test data. No copy-review service was started, and no
139README prose was changed.
140
141Delivery target: `origin/chat-ui`. The harness stopped its loopback servers and
142browsers and removed its temporary databases and profiles. The task scratch
143files were removed at handoff; the 24 comparison PNGs remain in the repository.
144The release/install areas named in the brief were not changed.
145
146## Round 2
147
148Starting point: `b42b4ed`, the second brief on `acf53a2`. The sidebar now has
149one team name and switch control, one Specialists heading, compact status text,
150and project and Needs you counts. Playbooks and the template library are under
151Team. Failed count reads remain unavailable.
152
153Incoming messages are plain text under their sender label. Your messages use a
154right-aligned tinted bubble, with a small keyboard-accessible actions menu.
155Dates separate days, including retained history after live updates. The header
156and rounded composer stay in place while the feed scrolls. On phones the back
157link shares the title row. The composer has a placeholder, an accessible label,
158and a small Send button. Its project picker appears only in the main conversation
159when projects exist. Choosing a project prefixes the message with its name,
160visible in the sent message. This supplies context without changing project
161permissions or automatically assigning a task.
162
163Question cards use a hairline border and attention tint. Single-field native
164questions with options have one-tap answers. Free text starts at one line and
165grows as you type; Send and Deny retain the existing answer handlers. Task cards
166link to their thread, include project, kind and age, and use step pills with
167category, action, model and account. Arrows connect the steps; active and done
168states have markers as well as colour. Edit plan and Why these models are small
169controls. Evidence and project correction remain available in the card's details.
170
171Navigation reads now live with the navigation view. Browser wait, click and
172capture helpers are shared in `internal/browsertest`. Existing size ceilings are
173unchanged. Vendored assets, schema, release code and README prose are unchanged.
174
175### Round 2 verification
176
177The first browser run failed on the sidebar, message presentation, date separator,
178header, question, task actions and composer. The first project-context test failed
179because the selection was absent from the message. The first option-label test
180failed because native option labels were discarded. Adding date separators also
181exposed a retained-history offset failure; rebuilding the separators across
182retained and newly loaded messages fixed it. Final review also found the missing
183recommendation-kind label. `TestChatTaskKinds` failed before that pending copy
184entry was added.
185
186All commands use `GOTOOLCHAIN=go1.26.10 CGO_ENABLED=0`:
187
188- Browser checks, passed: `go test -tags browser ./internal/equipotest ./internal/plan3test -run '^(TestChatBrowser|TestFoundationBrowserWalk|TestRunnerTaskBrowserWalk|TestConversationLayout|TestTeamsHierarchyBrowser)$' -count=1`.
189- Scriptless checks, passed: `EQUIPO_BROWSER_NO_JS=1 go test -tags browser ./internal/equipotest -run '^(TestChatBrowser|TestFoundationBrowserWalk|TestRunnerTaskBrowserWalk)$' -count=1`.
190- Focused checks, passed: `go test ./internal/equipo ./internal/plan3test ./internal/runnerproto -run '^(TestChatNavigationStatus|TestChatTaskKinds|TestConversationMessageReplay|TestPlan3ReleaseBoundaries|TestQuestionOptionLabels)$' -count=1`.
191- Full gate: `GOFLAGS=-p=2 make -k ci`, one run, exit 2. The failures were two old assertions: `TestRailRoutes` required a separate Teams row with an icon, and `TestConversationNoProjectPicker` rejected a selector even when projects existed. They now check the team switch and the conditional picker. Their focused rerun passed. The full affected-package rerun, `GOFLAGS=-p=2 go test ./internal/equipotest ./internal/plan3test -count=1`, passed: 334.069s and 197.220s respectively. The application package still exceeded its advisory 300s local limit. Final browser reruns passed in 37.214s and 5.582s.
192
193Build, vet, formatting, static analysis, vulnerability and secret scans, size
194budgets, adapter, containment, migration and performance checks passed in that
195full run. The test step took 17m33.138s: 27 packages passed and two failed on the
196assertions above. No second full gate run was made. The final recommendation
197label was added during the gate and passed the task-kind, template-copy and
198copy-inventory checks separately.
199
200Conversation first-byte time was 25.721 ms median, 33.421 ms worst; task threads
201were 22.319 ms median, 28.049 ms worst. Both are within the 150 ms budget.
202Cold boot was 119 ms median against 500 ms.
203
204The full run emitted these local advisory timing notices. CI enforces them;
205passing the functional checks does not certify these timing limits.
206
207| Package | Observed | Limit |
208|---|---:|---:|
209| `internal/directlive` | 9m20.368s | 6m |
210| `internal/runner` | 8m10.746s | 5m30s |
211| `internal/runner/provider` | 32.779s | 15s |
212| `internal/runner/provider/claude` | 1m6.783s | 45s |
213| `internal/runner/provider/codex` | 57.863s | 35s |
214
215Twenty-one mutations were applied separately and restored. Each failed its guard:
216
217| Guard command | Deliberate breakages caught |
218|---|---|
219| `go test -tags browser ./internal/equipotest -run '^TestChatBrowser$' -count=1` | Separate brand restored; team switch removed from header; duplicate specialist heading; wrapping counts; missing project count; boxed incoming text; visible own email; missing message menu; missing date separator; expanded header; multiline initial question field; missing options; missing age; missing plan controls; missing placeholder; page overflow; wrong option answer field. |
220| `go test -tags browser ./internal/plan3test -run '^TestConversationLayout$' -count=1` | Removed date rebuilding from retained history. |
221| `go test ./internal/plan3test -run '^TestConversationMessageReplay$' -count=1` | Selected project omitted from the message. |
222| `go test ./internal/runnerproto -run '^TestQuestionOptionLabels$' -count=1` | Native option labels discarded. |
223| `go test ./internal/equipo -run '^TestChatNavigationStatus$' -count=1` | Working count replaced with zero. |
224
225### Round 2 captures and copy
226
227The ten `after/*.png` files under `docs/mockups/built/2026-11-05/` are replaced
228at the original 1280×900 and 390×900 sizes. Before and reference images remain
229unchanged. The fixture question now includes Net and Subtotal options so the
230one-tap controls can be compared with the reference. Capture uses the original
231command above, with `EQUIPO_CHAT_BASELINE=1`; the four history captures also use
232`EQUIPO_CHAT_HISTORY=1`. Captures exclude replies inserted by browser assertions.
233
234Each new entry below has `// COPY REVIEW PENDING` in `copy.go`. The consolidated
235Plan 3 inventory contains the same pending entries. Its test now expects the
236release-copy check to reject this branch while that copy is pending.
237
238| Key | Draft text |
239|---|---|
240| `task.kind.recommendation` | Recommendation |
241| `nav.switch` | switch |
242| `nav.idle` | idle |
243| `nav.waiting` | waiting |
244| `nav.queued` | queued |
245| `conversation.placeholder` | Ask for a fix, a feature, or what’s next |
246| `conversation.today` | Today |
247| `conversation.message_actions` | Message actions |
248| `conversation.any_project` | Any project |
249| `conversation.why_models` | Why these models? |
250| `conversation.send_short` | Send |
251| `conversation.age_minutes` | %d min |
252| `conversation.age_hours` | %d hr |
253| `conversation.age_days` | %d d |
254
255No copy-review server was started. The harness closed its loopback servers and
256browsers. Scratch captures, mutation scripts and test logs were removed. Delivery
257target is `origin/chat-ui`; no default-branch push or deployment.
258