chore(agent): track .agent/ planning tree in git
Remove the blanket .agent/ gitignore so the phase roadmap, user stories, reports, and PLAN.md are versioned with the code. Only runtime artifacts (.agent/phase-sessions/, .agent/pipeline.log) remain ignored. Update AGENTS.md git protocol rule to match.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Phase 58 — 2× Reading Column on Wide Desktops
|
||||
|
||||
**Source:** `TODO.md` L5 — "The chat response needs to be 2x wider on wide desktops. there's a lot of unused space."
|
||||
**Story:** n/a (TODO-derived — owner roadmap confirmation 2026-08-31, D2 + owner expansion: the document view widens too)
|
||||
**Context:** The 46rem reading column is hard-coded in four places in `frontend/assets/styles.css`: `.chat-shell` (~L399), `.shared-shell` (~L2153), `.doc-md` (~L2319) and `.doc-summary:has(+ .doc-md)` (~L2369). A fifth 46rem column, `.tuning-shell` (~L903), is **out of scope** (it is a form, not a reading surface). Surrounding block comments reference the PLAN §7 "46rem column" contract — comments get updated to note the wide override; `.agent/PLAN.md` does not exist in this repo (removed by owner, commit 281f355) and `AGENTS.md` is not touched per protocol — the owner's new instruction supersedes the old "46rem" wording.
|
||||
|
||||
## Objective
|
||||
On wide desktops the chat reading column (incl. the shared chat view) **and** the document reading column are 2× — 92rem — while everything below the wide breakpoint renders exactly as today.
|
||||
|
||||
## Dependencies
|
||||
- `57_edit_document_summaries` (todo, preceding)
|
||||
|
||||
## Tasks
|
||||
1. `01_wide_column_css.md` — `--chat-column` custom property (46rem base) + `@media (min-width: 1500px)` override to 92rem; the four selectors switch to the property; comments updated; unit CSS pins.
|
||||
2. `02_e2e_wide_column.md` — measured-width Playwright proof at 1920px vs 1280px (chat, document, shared) + regressions + the atomic commit.
|
||||
|
||||
## Testing & Quality
|
||||
- Unit CSS pins (house style, `tests/unit/test_save_chat_ui.py` pattern): `--chat-column: 46rem` in `:root`; a `min-width: 1500px` media block setting it to `92rem`; the four selectors use `var(--chat-column)`; `.tuning-shell` still hard-coded `46rem` (negative pin).
|
||||
- E2E (mandatory, A16): `tests/e2e/test_wide_desktop_column.py`, run in isolation (bounding-box width assertions).
|
||||
- Coverage: **>90%** on `app/` (validate.sh gate — pure-CSS phase, gate still runs).
|
||||
|
||||
## Completion Criteria
|
||||
- [ ] At 1920×1080: `.chat-shell` (chat page), `.shared-shell` (`/shared/<token>`), and `.doc-md` (document viewer) are ~1472px (92rem ±4); the `.doc-summary` panel matches the column when present.
|
||||
- [ ] At 1280×800: all of the above are ~736px (46rem ±4) — and at 360px/900px the existing mobile/tablet rules are byte-for-byte untouched (no horizontal overflow at 360px).
|
||||
- [ ] `.tuning-shell` stays 46rem at every width.
|
||||
- [ ] `uv run pytest` green; coverage TOTAL >90%.
|
||||
- [ ] `uv run pytest tests/e2e/test_wide_desktop_column.py -v --no-cov` green in isolation (DB up).
|
||||
- [ ] Regression E2E suites green in isolation: `test_responsive_polish.py`, `test_smoke.py`, `test_document_viewer.py`, `test_markdown_tables.py`, `test_shared_header.py`.
|
||||
- [ ] `uv run ruff check . && uv run pyright` clean.
|
||||
- [ ] One `--no-gpg-sign` commit; phase dir moved to `.agent/phases/complete/` (`.agent/` stays untracked — owner instruction, commit 281f355).
|
||||
|
||||
## Locked decisions
|
||||
- **Owner-locked (2026-08-31, roadmap confirmation, D2 + expansion):**
|
||||
1. Wide desktop = viewport `min-width: 1500px`; the reading column becomes **92rem (2× 46rem)**.
|
||||
2. Scope: `.chat-shell`, `.shared-shell`, `.doc-md`, `.doc-summary:has(+ .doc-md)` — the owner explicitly extended the TODO's "chat response" to the document view as well.
|
||||
3. `.tuning-shell` (and every other 46rem surface) is **unchanged**; mobile/tablet breakpoints are untouched.
|
||||
- Block comments in `styles.css` that cite the "46rem contract" are updated to name the base value + the wide override (owner instruction 2026-08-31, TODO L5) — no other file outside `frontend/` + `tests/` changes.
|
||||
|
||||
## Commit
|
||||
```bash
|
||||
git add frontend/ tests/ && git commit --no-gpg-sign -m "feat(web): 2x reading column on wide desktops — 92rem at >=1500px (chat, shared, document view)"
|
||||
```
|
||||
@@ -0,0 +1,36 @@
|
||||
# Task 01 — `--chat-column`: 46rem base, 92rem at ≥1500px
|
||||
|
||||
**Phase:** `58_wide_desktop_column` · **Source:** `TODO.md:5` — "The chat response needs to be 2x wider on wide desktops. there's a lot of unused space."
|
||||
**Story:** n/a (TODO-derived)
|
||||
|
||||
## Objective
|
||||
One custom property drives the reading column width everywhere it matters: 46rem by default, 92rem at `min-width: 1500px` — no other layout change.
|
||||
|
||||
## Work
|
||||
1. `frontend/assets/styles.css`:
|
||||
- `:root` (with the other tokens): add
|
||||
```css
|
||||
/* Reading column: 46rem base (PLAN §7 lineage); 2x on wide desktops
|
||||
(owner instruction 2026-08-31, TODO L5 / D2 — chat + shared + document view). */
|
||||
--chat-column: 46rem;
|
||||
```
|
||||
- In the media-query region at the bottom (the `@media (max-width: …)` blocks near ~L2616 — add the **min-width** sibling alongside them):
|
||||
```css
|
||||
@media (min-width: 1500px) {
|
||||
:root { --chat-column: 92rem; }
|
||||
}
|
||||
```
|
||||
- Replace the four hard-coded `max-width: 46rem` values with `max-width: var(--chat-column)`:
|
||||
- `.chat-shell` (~L399), `.shared-shell` (~L2153, keep its comment "the centered chat column" but note the wide override), `.doc-md` (~L2319), `.doc-summary:has(+ .doc-md)` (~L2369).
|
||||
- Update the adjacent block comments that claim the "46rem column contract" (e.g. ~L395 "centered, capped column", ~L416 "46rem column contract is untouched", ~L593 "never shifts the 46rem chat column", ~L2141/2315/2364/2440/2579) so they describe **base 46rem, 2× at ≥1500px** — do not touch `.tuning-shell` (~L903) or any other rule.
|
||||
- No new page, no new class — the `?v=` cache-bust rewrite picks the file up automatically.
|
||||
2. Unit CSS pins (extend the existing `styles.css` source-pin test file, house pattern `test_save_chat_ui.py`):
|
||||
- `--chat-column: 46rem` present in `:root`.
|
||||
- A `@media (min-width: 1500px)` block exists and sets `--chat-column: 92rem`.
|
||||
- The four selectors (`.chat-shell`, `.shared-shell`, `.doc-md`, `.doc-summary:has(+ .doc-md)`) reference `var(--chat-column)`.
|
||||
- `.tuning-shell` still contains the literal `46rem` (negative pin — the form column does not widen).
|
||||
|
||||
## Completion Criteria
|
||||
- [ ] Exactly the four reading-column selectors use the property; `.tuning-shell` and all sub-1500px layout are unchanged.
|
||||
- [ ] Comments cite the wide override with its provenance (owner instruction 2026-08-31, TODO L5).
|
||||
- [ ] Unit pins green; `uv run pytest` green; `uv run ruff check . && uv run pyright` clean.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Task 02 — E2E: measured column widths + regressions + commit
|
||||
|
||||
**Phase:** `58_wide_desktop_column` · **Source:** `TODO.md:5` — "The chat response needs to be 2x wider on wide desktops. there's a lot of unused space."
|
||||
**Story:** n/a (TODO-derived)
|
||||
|
||||
## Objective
|
||||
Measure the actual rendered column at wide and non-wide viewports on all three surfaces, prove sub-1500px is untouched, run the regressions, and commit the phase.
|
||||
|
||||
## Work
|
||||
1. `tests/e2e/test_wide_desktop_column.py` (Playwright, DB up; seed one markdown fixture doc for the viewer — the `test_document_viewer.py` seeding pattern; create one shared chat for the shared surface — the `test_chat_history.py`/`test_share_chat.py` save-then-share helper):
|
||||
- `test_chat_column_wide_vs_base` — viewport 1920×1080: on `/`, `.chat-shell` `bounding_box` width ≈ 1472px (92rem, ±4px). Viewport 1280×800: ≈ 736px (46rem, ±4px).
|
||||
- `test_document_column_wide_vs_base` — open the seeded md doc: at 1920 `.doc-md` ≈ 1472px, at 1280 ≈ 736px. (If the seeded doc carries a summary, also pin `.doc-summary:has(+ .doc-md)` ≈ 1472px at 1920.)
|
||||
- `test_shared_column_wide` — `/shared/<token>` at 1920: `.shared-shell` ≈ 1472px.
|
||||
- `test_narrow_unchanged` — 360px and 900px viewports: `.chat-shell` matches the existing mobile rules (no horizontal overflow at 360px — the `test_responsive_polish.py` assertion style), pinning that the wide rule does not leak below 1500px.
|
||||
- DB isolation: the shared-chat row is deleted in a `finally` (admin cookie); the fixture doc rows follow the story-fixture convention of the sibling suites.
|
||||
2. Regression pass (isolation runs): `test_responsive_polish.py` (mobile/tablet contract), `test_smoke.py`, `test_document_viewer.py`, `test_markdown_tables.py` (tables render inside the now-wider `.doc-md` column), `test_shared_header.py`.
|
||||
3. `uv run pytest` green; `uv run pytest --cov=app --cov-report=term-missing` >90%; `uv run ruff check . && uv run pyright` clean.
|
||||
4. Commit (Conventional Commits, `--no-gpg-sign`) — the message from the phase overview's Commit section; move `.agent/phases/todo/58_wide_desktop_column/` → `.agent/phases/complete/`.
|
||||
|
||||
## Testing & Quality
|
||||
- E2E: `uv run pytest tests/e2e/test_wide_desktop_column.py -v --no-cov` green in isolation.
|
||||
- Coverage: **>90%** on `app/`.
|
||||
|
||||
## Completion Criteria
|
||||
- [ ] All three surfaces measure 2× at 1920px and base at 1280px (±4px pins).
|
||||
- [ ] 360px/900px layout is unchanged (no overflow); `.tuning-shell` unmeasured-and-unchanged by CSS pin.
|
||||
- [ ] Regression suites pass in isolation.
|
||||
- [ ] One atomic `--no-gpg-sign` commit; phase dir moved to `.agent/phases/complete/`.
|
||||
Reference in New Issue
Block a user