Skip to content

fix(ux): P2 — coloured badges, collapse empty detail fields, honest notifications state - #106

Merged
os-zhuang merged 1 commit into
mainfrom
fix/ux-p2-polish
Jun 10, 2026
Merged

fix(ux): P2 — coloured badges, collapse empty detail fields, honest notifications state#106
os-zhuang merged 1 commit into
mainfrom
fix/ux-p2-polish

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Final P2 polish from the mobile UX walkthrough.

Coloured status badges (list + detail)

Object metadata carries hex option colours (#10B981, #3B82F6…), which the named-colour Tailwind map couldn't resolve — so every status/priority badge rendered flat grey. StatusBadge now renders a hex option as an inline tint (light background + the colour as text). List rows render the option badge (via a new exported OptionBadge) instead of plain Status: Completed text.

Result: Completed = green, In Progress = blue, High = amber, Urgent = red, Low = light-blue — in both the list and the detail view.

Collapse empty fields in the detail auto-layout

The no-curated-view fallback rendered a column of for every empty field (Description, Due Date, Tags…). It now collapses empty-valued fields. Curated views are untouched — they still show every field the author listed, empty or not.

Honest notifications state

The screen showed the cheerful "You're all caught up" even when the fetch failed (e.g. the notifications service isn't mounted → 404). It now distinguishes unavailable (with a retry) from a genuinely empty inbox. New notifications.unavailable* keys in en/zh/ar.

Deliberately deferred

A web content max-width cap. Web is the secondary target (on device the app is already width-constrained), and a good global width cap is a broad layout change whose regression risk isn't justified here. Easy to add later if web becomes a priority.

Verification

Browser (zh, mobile width): list + detail badges coloured, empty detail fields gone, notifications shows 通知不可用 … 重试. +6 tests, 1281 pass, typecheck + lint clean.

🤖 Generated with Claude Code

…onest notifications state

Polish from the mobile UX walkthrough:

- Status/select values render as the option's colour. Option metadata carries
  hex colours (e.g. `#10B981`), which the named-colour map couldn't resolve, so
  every badge fell back to flat grey. `StatusBadge` now renders a hex option as
  an inline tint, and list rows show the option badge (via the exported
  `OptionBadge`) instead of plain "Status: Completed" text.
- The detail auto-layout collapses empty-valued fields instead of rendering a
  column of "—". Curated views still show every field the author listed.
- The notifications screen distinguishes a failed fetch (service unavailable →
  retry) from a genuinely empty inbox, so a 404 no longer masquerades as
  "you're all caught up". New i18n keys in en/zh/ar.

Deliberately deferred: a web content max-width cap. Web is the secondary
target (the app runs full-width-constrained on device), and a good global
width cap is a broad layout change not worth the regression risk here.

Verified in the browser: list + detail badges are coloured (Completed green,
High amber, Urgent red…), empty detail fields are gone, notifications shows the
unavailable state. +6 tests, 1281 pass, lint clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 7896b48 into main Jun 10, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant