Skip to content

feat(ux): notification grouping + relative time, recent searches, haptics - #122

Merged
os-zhuang merged 1 commit into
mainfrom
feat/ux-feed-polish
Jun 11, 2026
Merged

feat(ux): notification grouping + relative time, recent searches, haptics#122
os-zhuang merged 1 commit into
mainfrom
feat/ux-feed-polish

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

UX-F (1/2) — Feed polish

Part of the final polish pass from the browser walkthrough.

Notifications

  • Date grouping — the flat list is now sectioned into Today / Yesterday / This Week / Earlier.
  • Relative timestamps — "Just now", "5m", "2h", "Yesterday", else a calendar date, replacing the raw toLocaleDateString(). The day-bucket + relative-time helpers (lib/relative-time) are pure and unit-tested, and use compact non-pluralized forms to sidestep Hermes's missing Intl.PluralRules.
  • Selection haptic on tap.

Search

  • Recent searches — queries are persisted (MMKV store, case-insensitively deduped, newest-first, capped at 8) and offered in the idle state for one-tap re-run, each with a remove control plus clear-all. A query is remembered when the user taps a result. Selection haptic on re-run.

i18n & tests

time.* + notifications.group* + search.recent* across en/zh/ar. New stores + helper covered by unit tests. Full suite: 1327 passing.

Verified

Browser (375dp, dark, zh): tapped a search result → search idle shows 最近搜索 → Learn with 清除 + per-row ✕. (Notification grouping is unit-tested; the notifications service isn't mounted in this env.)

Deferred to a follow-up (UX-F 2/2)

  • List density preference (compact/comfortable).
  • Inline status-badge edit on the detail screen.

🤖 Generated with Claude Code

…, haptics

Notifications:
- Group the flat list into Today / Yesterday / This Week / Earlier sections.
- Show compact relative timestamps ("Just now", "5m", "2h", "Yesterday",
  else a date) instead of a raw locale date. The relative-time + day-bucket
  helpers are pure and unit-tested, and use compact non-pluralized forms to
  sidestep Hermes's missing Intl.PluralRules.
- Selection haptic on tap.

Search:
- Persist recent queries (MMKV store, deduped case-insensitively, newest-first,
  capped at 8) and offer them in the idle state for one-tap re-run, each with a
  remove control plus a clear-all. A query is remembered when the user taps a
  result. Selection haptic on re-run.

i18n: time.* + notifications.group* + search.recent* in en/zh/ar. New stores +
helper covered by unit tests; full suite 1327 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 5982081 into main Jun 11, 2026
@os-zhuang
os-zhuang deleted the feat/ux-feed-polish branch June 11, 2026 10:43
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