Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Owner: "with many categories loaded the strip grows from the bottom-left and ove

| ID | Task | Owner | Status | Notes |
|---|---|---|---|---|
| T-109 | The dock publishes its own width as `--dock-w` (ResizeObserver, no React state); above 640 px `.poi-strip` and `.corner` cap at `(100% − var(--dock-w)) / 2 − 16px`, and the attribution wraps instead of being covered. Correct by construction because the dock is centred on the bar in both chromes | map-ui-dev → review → qa | doing | Alternatives weighed and rejected in the PR: a summary chip past N, a static max-width (no constant works — the agent lane moves the gutter), one flex row (touches the tray anchor, landing hint and four media queries) |
| T-109 | The dock publishes its own box as `--dock-w` / `--dock-h` (one `ResizeObserver`, no React state); above 640 px `.poi-strip` and `.corner` cap at `(100% − var(--dock-w)) / 2 − 16px`, and while a category is browsed (`.dock-actives`) the whole bottom bar lifts above the dock (`bottom: calc(var(--dock-h) + 28px)`) so the attribution is never covered. Correct by construction because the dock is centred on the bar in both chromes | map-ui-dev → review → qa | done | Alternatives weighed and rejected in the PR: a summary chip past N, a static max-width (no constant works — the agent lane moves the gutter), one flex row (touches the tray anchor, landing hint and four media queries). Review: merge after fixes (stale comment, duplicate `.badge` rule, `usePublishedBox` contract) — applied. Layout is not measurable in the node vitest environment, so the gate is e2e: `bottom-band.spec.ts` sweeps 18 cells (921/1024/1440 × human/agent chrome × none/3 browsed/15 loaded) with `boundingBox()` intersections and `elementFromPoint` on every attribution link; 13/18 red on develop, 54/54 green on the fix (`--repeat-each=3`). ≤640 px stays F-14 |

## T-110 — a person plans a walking route by clicking two points · owner approved 2026-09-02 · gate: the human can do what `plan_route` does, and the agent's tool is untouched

Expand All @@ -91,7 +91,8 @@ Owner asked how a human uses routing; the answer was "only through an agent". Pa
- **F-13 (tool-dev)** No tool echoes an annotation's coordinate: `AnnotationOutput` (`state.ts:55`) carries `id`, `note`, `source` only, so an agent that pinned a note by place name cannot confirm where it landed without re-resolving the name itself. Found writing the T-106 e2e, which had to read the store directly. Adding `at: [lng, lat]` (5 dp) costs ~30 B a note.
- **F-14 (map-ui-dev)** At ≤640 px the loaded-categories strip overflows the bottom bar's left edge by 6–22 px (`.bottom-bar` is `justify-content: flex-end` and `.corner` is `flex-shrink: 0`, so overflow goes left). Text stays readable. Fix is letting `.corner` shrink at that tier — not `safe flex-end`, which would push the attribution off the right instead. Found during T-109.
- **F-15 (map-ui-dev)** `.pin-card` has `max-width: 210px` and no `max-height`: `annotate` with `"a\n".repeat(250)` renders a ~4,400 px bubble that covers other pins. The fold (T-107) is the current escape hatch. A companion cap (`max-height` + fold-on-overflow, or collapsing interior newlines in the bubble only) is a design call. Found during T-108's review.
- **F-16 (qa)** `e2e/awakening-flight.spec.ts:249` reads bounds immediately after `setViewportSize` and races the republish (~4/24 on develop). Same family as F-1; the fix is a wait on the republished bounds, never a sleep. Handed to qa 2026-09-02.
- **F-16 (qa)** ~~`e2e/awakening-flight.spec.ts:249` reads bounds immediately after `setViewportSize` and races the republish (~4/24 on develop).~~ Fixed 2026-09-02, rides the T-109 PR: the spec captures the raw bounds tuple before the resize and `waitForFunction`s until it changes (bounded 1,500 ms, no sleep); 48/48 with `--repeat-each=12`.
- **F-17 (map-ui-dev)** With the inspector open at 1350 px, the *open* Places tray's bottom-right corner overlaps the OpenFreeMap attribution pill by ~7 CSS px (tray bottom 835 vs attribution top 828). The tray is anchored above the dock and the attribution to the map's right edge; T-109's caps and lift only govern the closed bar, not the tray panel. Cosmetic; the links stay clickable. Found capturing Devpost media 2026-09-02.

## Handoff log

Expand All @@ -118,5 +119,6 @@ Append-only. `date · from → to · what`.
- 2026-09-01 · orchestrator → all · `scripts/ship-pr.sh --merge-back` runs `git switch` in the repo root, which fails when the head branch is checked out in a worktree. Merge `origin/develop` inside the worktree instead, then ship without the flag — and it is the better order anyway, because the integration check then runs against the base you are merging into.
- 2026-09-02 · qa → all (lesson) · Every tool call writes an activity row, read-only ones included — `get_map_state` too. "A human gesture writes no row" is only assertable before the next tool call, so an e2e that checks it must read the store, not call a tool, or assert before the first call.
- 2026-09-02 · orchestrator → qa · `e2e/awakening-flight.spec.ts:249` flakes ~4/24 on develop: it reads bounds right after `setViewportSize` with no wait for the republish. Wait for the republished bounds (no fixed sleep). Ticketed F-16.
- 2026-09-02 · qa → all (lesson) · Any real tool call wakes the page into agent chrome, so a human-chrome e2e cell must reach its content state by hand: `bottom-band.spec.ts` loads 15 categories by tapping chips in the Places tray (a 4th tap evicts the oldest *painted* chip but never unloads it) and un-paints with the chips' `×`. Also: `page.waitForFunction(fn, arg, options)` — the timeout goes in the third argument; in the second it is silently the page function's argument and the wait falls back to the test timeout.
- 2026-09-01 · review → all (lesson) · Four of the T-41 README defects were the same shape: prose describing what a surface was *designed* to do rather than what the component does. Read the component before the sentence, not the sibling doc.
- 2026-09-02 · qa → tool-dev · Beads are tier-2/browse-only: a selected *bundled* feature paints a selection ring, and its clickable render is its category's circle layer (`INTERACTIVE_LAYER_IDS`), not `BEAD_LAYER_IDS`. A spec that needs to tap a selected station must query the interactive layers.
36 changes: 28 additions & 8 deletions e2e/awakening-flight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,37 @@ test.describe("the Awakening does not cancel the first flight (T-104)", () => {
// changes (944px corridor -> 1104px), isolating this from a lane-width
// change.
await page.waitForTimeout(300);
// Captured raw (unrounded) so the poll below can compare tuple to tuple --
// `beforeResize.bounds` is the tool's own *rounded* echo, and comparing a
// raw live value against a rounded one would nearly always read as
// "changed" even when nothing has, defeating the wait.
const rawBoundsBeforeResize = await page.evaluate(() => window.__glassmapStore!.getState().bounds);
await page.setViewportSize({ width: 1440, height: 900 });

// Read back WHILE the flight is still in the air -- the ~2s ease is
// nowhere near done at 300ms in, and this read is one fast `page.evaluate`
// round trip, so this samples well before `waitForLiveArrival` below ever
// resolves. `onResize`'s own `pushBoundsFromMap()` call is the only thing
// that can have moved `bounds` already: the flight's own `moveend` -- the
// other path that republishes bounds -- has not fired yet, and won't for
// another second or more. Without that line `bounds` would still equal
// `beforeResize.bounds` here, describing a canvas 160px narrower than the
// one actually on screen, until the flight happens to land on its own.
// nowhere near done at 300ms in. `onResize`'s own `pushBoundsFromMap()`
// call is the only thing that can have moved `bounds` already: the
// flight's own `moveend` -- the other path that republishes bounds -- has
// not fired yet, and won't for another second or more.
//
// `page.setViewportSize` resolves once the emulated viewport itself has
// been resized, not once the window's own "resize" event -- and
// `onResize`'s listener with it -- has actually run; that dispatch is
// asynchronous relative to the CDP call, so reading `bounds` immediately
// after raced it and occasionally won, seeing the PRE-resize bounds
// (observed ~4/24 CI runs). Poll the live store directly instead of
// reading once: bounded well under the flight's own remaining ease, so a
// build whose flight simply lands before the resize handler ever runs
// cannot make this pass for the wrong reason.
await page.waitForFunction(
(previous) => {
const bounds = window.__glassmapStore?.getState().bounds;
return !!bounds && JSON.stringify(bounds) !== JSON.stringify(previous);
},
rawBoundsBeforeResize,
{ timeout: 1500 },
);

const midResize = await callTool(page, "get_map_state");
expect(midResize.error).toBeUndefined();
expect(midResize.bounds).not.toEqual(beforeResize.bounds);
Expand Down
Loading
Loading