Skip to content

docs(spec): add mobile UI design-system spec - #905

Merged
kovtcharov-amd merged 2 commits into
mainfrom
kalin/mobile-design-system
Apr 29, 2026
Merged

kovtcharov-amd merged 2 commits into
mainfrom
kalin/mobile-design-system

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

Summary

Adds `docs/spec/mobile-design-system.md` — pins design-system patterns (breakpoints, navigation, modals, touch standards, voice button placement, safe-area handling, accessibility, component inventory) before mobile UI work begins.

Why

The mobile work in M1 (#894 PWA), M2 (#895 responsive), M3 (#896 voice), M5 (#898 tunnel share) all touches the same React tree. Without a pinned spec, parallel agents on adjacent issues produce 4 different navigation patterns, 4 different modal patterns, 4 different touch conventions — guaranteeing rework. This spec is the prerequisite (per AGENTS.md "spec-before-PR" rule) for those issues to become agent-assignable.

Key decisions documented

  • 768px breakpoint for mobile (matches existing App.tsx logic)
  • Slide-out drawer for navigation (chosen over bottom-tab; rationale documented)
  • `` component pair — desktop floating ↔ mobile fullscreen
  • 44×44pt touch targets per Apple HIG
  • Push-to-talk default on mobile for voice button
  • Component inventory under `src/gaia/apps/webui/src/components/mobile/` with TypeScript prop interfaces

Cross-references

Test plan

  • Markdown renders correctly on GitHub
  • Cross-references to existing files (App.tsx line ranges, etc.) are accurate
  • All 14 sections present

Pins design-system patterns (breakpoints, navigation, modals, touch
standards, voice button placement, safe-area handling, accessibility,
component inventory) before mobile UI work in M1/M2/M3/M5 (#894-#898)
begins. Without this spec, parallel agents on adjacent issues produce
divergent component patterns and require rework.

Documents the slide-out drawer choice over bottom-tab navigation
(with rationale), 768px mobile breakpoint, the <Panel> component
pair (desktop floating ↔ mobile fullscreen), 44pt touch minimums per
Apple HIG, push-to-talk voice default on mobile, and a per-component
inventory under src/gaia/apps/webui/src/components/mobile/.

Resolves the spec deliverable from issue #901.
The old URL m3.material.io/foundations/accessible-design/accessibility-basics
returns 404. The correct page is at /foundations/accessible-design.
@github-actions

Copy link
Copy Markdown
Contributor

Summary

This PR adds a single 466-line spec doc (docs/spec/mobile-design-system.md) to pin design-system patterns before parallel mobile UI work begins on issues #894–#898. As a docs-only PR with no code impact, the review bar is technical accuracy of cross-references and internal consistency. The spec is well-researched and largely accurate — it correctly inspects the existing webui (vanilla CSS, not Tailwind), pins the 768px breakpoint to match real App.tsx logic, documents rejected alternatives, and provides typed prop interfaces for future components. A few minor issues to address before merge.

Issues Found

🟢 Minor

1. Issue ↔ milestone mapping disagrees between PR description and spec (mobile-design-system.md:11, 433–438)

The spec consistently says M1 = tunnel (#893) and M5 = PWA (#898):

  • Header line 11: Issues #893 (M1 tunnel) … #898 (M5 PWA)
  • Section 12 table: same mapping

But the PR description says:

M1 (#894 PWA), M2 (#895 responsive), M3 (#896 voice), M5 (#898 tunnel share)

That's the inverse on M1/M5. Either the spec or the description is wrong — please reconcile so future agents reading either source land on the same milestone graph. (The spec is internally consistent, so most likely the PR description got the M-numbers swapped.)

2. Line-number drift on App.tsx references (mobile-design-system.md:68–69, 105)

Spot-check against the current App.tsx (556 lines):

Spec claim Actual
App.tsx lines 309–317, 332, 372, 449, 452 use window.innerWidth <= 768 / > 768 Lines 311, 333, 372, 449, 452 ✓ exact except 332→333 and 309–317→311
App.tsx lines 480–502 for sidebar 478–501 ✓ in range
App.tsx lines 22–52, 520–539 for AnimatedPresence ✓ exact
App.tsx:484 hamburger aria-label ✓ exact
App.tsx:531 MobileAccessModal desktop-only guard ✓ exact
App.tsx:550 toast role="alert" ✓ exact
index.css:134 WCAG comment ✓ exact
index.css:187 grain texture [data-theme="dark"] #root::after ✓ exact
index.html viewport tag missing viewport-fit=cover ✓ confirmed (line 5: content="width=device-width, initial-scale=1.0")

Most refs are dead-on, but the 309–317, 332 pair is slightly stale (current file has those checks at 311 and 333). Either tighten the numbers or use the looser "lines ~311, ~333" form so the spec doesn't get bit-rotted by trivial whitespace edits upstream. Suggestion:

- `src/gaia/apps/webui/src/App.tsx` lines ~311, 333, 372, 449, 452
  all use `window.innerWidth <= 768` / `> 768`.

3. Section 8 code block mixes CSS and HTML (mobile-design-system.md:257–268)

The fenced ```css block contains both a CSS :root { … } declaration and an HTML <meta> tag with a CSS-comment header. Inside a CSS block, the <meta …> lines aren't valid CSS — they'll syntax-highlight oddly and confuse copy-paste. Split into two blocks:

```css
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

Add to <meta name="viewport"> in index.html:

<meta name="viewport"
      content="width=device-width, initial-scale=1.0, viewport-fit=cover">

**4. File extension is `.md`, not `.mdx`** (`mobile-design-system.md`)

`CLAUDE.md` states *"All docs use MDX (Markdown + JSX for Mintlify)"*. This file is `.md`. There is precedent for `.md` in `docs/spec/` — `agent-ui-known-issues.md`, `multi-agent-architecture.md`, `small-business-agent-team.md` are all `.md` and (correctly) **not** wired into `docs/docs.json`. They appear to be internal/draft specs not published to the Mintlify site. Since this PR is "Status: Draft" and also not added to `docs/docs.json`, that pattern is consistent — but worth confirming this is the intended path. If it's ever meant to render on amd-gaia.ai, rename to `.mdx` and add a `docs.json` entry; if it's intentionally an internal source-of-truth doc, the `.md` is fine and matches the three siblings.

## Strengths

- **Empirical grounding.** The breakpoint decision (`§3`) isn't a textbook value — it's pinned to five existing `window.innerWidth <= 768` checks in `App.tsx`, with a clear "changing this would invalidate logic in 5 places for no benefit" rationale. This is exactly the right way to write a spec.
- **Honest stack reality (`§2`).** Calling out "this is vanilla CSS, not Tailwind" upfront prevents the predictable failure mode where a downstream agent shows up with `tailwind.config.js` in their PR.
- **Documented alternatives (`§4`).** The drawer-vs-bottom-tab table with the "why bottom-tab loses" paragraph means a future contributor can revisit the decision with full context instead of relitigating it.
- **TypeScript prop interfaces (`§10`).** Defining `PanelProps`, `TouchTargetProps`, etc. up front gives M2 implementers a typed contract to land against, rather than discovering shape mid-PR.
- **Clear authority boundary (line 25):** "Anything inconsistent with this doc in code or in other specs is a bug against this doc." That's the load-bearing sentence for "spec-before-PR" to actually work.

## Verdict

**Approve with suggestions.** No blocking issues. Reconciling the M1/M5 issue mapping (#1) is the most important fix — it's a correctness issue that downstream agents will trip on. The line-number tightening (#2) and the split code block (#3) are quality-of-life polish. The `.md` vs `.mdx` question (#4) is a clarification, not a blocker.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit f7b2e67 Apr 29, 2026
23 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/mobile-design-system branch April 29, 2026 19:52
dislovelhl pushed a commit to dislovelhl/amd-gaia that referenced this pull request May 4, 2026
…work (amd#906)

Adds a third issue template (alongside `bug_report.yaml` and
`feature_request.yaml`) specifically for team-internal feature work and
tasks intended for coding-agent assignment.

## Why
The existing templates are user-facing. With AGENTS.md (PR amd#904)
establishing "spec-before-PR" as a rule for consumer-critical work,
internal issues need a template that prompts authors to capture: Goal,
Scope, Acceptance criteria, Attribution / prior art, Dependencies,
Failure modes, plus capability domain and product track selection.

## What it captures
- **Goal** + **Scope** + **Acceptance criteria** sections (required)
matching the depth of amd#887/amd#888/amd#890 specs
- **Attribution** section (per CLAUDE.md attribution rule)
- **Failure modes** section (per CLAUDE.md no-silent-fallback rule)
- **Domain dropdown** — 8 options matching the new `domain:*` label
taxonomy
- **Track dropdown** — 3 options matching `track:*` labels (consumer-app
/ oem-pc / platform)
- **Priority dropdown** with explicit definitions (p0=4 weeks, p1=2
milestones, etc.)
- **Consumer-critical** checkbox

## Cross-references
- AGENTS.md (PR amd#904) establishes the rules this template enforces in
practice
- Mobile design-system spec (PR amd#905) is an example of the spec depth
required for consumer-critical work

## Test plan
- [ ] Template renders correctly in the GitHub "New issue" picker
- [ ] All dropdowns work
- [ ] Required fields enforce on submit
- [ ] No conflict with existing bug_report or feature_request templates
theonlychant pushed a commit to theonlychant/gaia that referenced this pull request May 5, 2026
…work (amd#906)

Adds a third issue template (alongside `bug_report.yaml` and
`feature_request.yaml`) specifically for team-internal feature work and
tasks intended for coding-agent assignment.

## Why
The existing templates are user-facing. With AGENTS.md (PR amd#904)
establishing "spec-before-PR" as a rule for consumer-critical work,
internal issues need a template that prompts authors to capture: Goal,
Scope, Acceptance criteria, Attribution / prior art, Dependencies,
Failure modes, plus capability domain and product track selection.

## What it captures
- **Goal** + **Scope** + **Acceptance criteria** sections (required)
matching the depth of amd#887/amd#888/amd#890 specs
- **Attribution** section (per CLAUDE.md attribution rule)
- **Failure modes** section (per CLAUDE.md no-silent-fallback rule)
- **Domain dropdown** — 8 options matching the new `domain:*` label
taxonomy
- **Track dropdown** — 3 options matching `track:*` labels (consumer-app
/ oem-pc / platform)
- **Priority dropdown** with explicit definitions (p0=4 weeks, p1=2
milestones, etc.)
- **Consumer-critical** checkbox

## Cross-references
- AGENTS.md (PR amd#904) establishes the rules this template enforces in
practice
- Mobile design-system spec (PR amd#905) is an example of the spec depth
required for consumer-critical work

## Test plan
- [ ] Template renders correctly in the GitHub "New issue" picker
- [ ] All dropdowns work
- [ ] Required fields enforce on submit
- [ ] No conflict with existing bug_report or feature_request templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants