feat(ux): notification grouping + relative time, recent searches, haptics - #122
Merged
Conversation
…, 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UX-F (1/2) — Feed polish
Part of the final polish pass from the browser walkthrough.
Notifications
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 missingIntl.PluralRules.Search
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)
🤖 Generated with Claude Code