Skip to content

feat(notifications): collapsible event-type filter row, collapsed by default (v2.39.1) - #200

Merged
krazymir merged 1 commit into
mainfrom
claude/collapsible-notification-filters-2570de
Oct 20, 2026
Merged

krazymir merged 1 commit into
mainfrom
claude/collapsible-notification-filters-2570de

Conversation

@krazymir

Copy link
Copy Markdown
Contributor

What

The Notifications page's event-type filter (one chip per type, 33 chips today) wrapped to about 9 lines and pushed the inbox below the fold. It is now a collapsible TYPE · 33 › row, collapsed by default.

  • Remembered per browser. Only the open/closed choice is stored, under skilly.notifications.types-open ("1" = open, anything else = collapsed). The type selection still lasts one visit.
  • A collapsed, filtered inbox always shows why. While the row is collapsed and types are selected, <k> selected · ✕ clear sits beside the header. While the row is open, the chips show the selection and ✕ clear stays at the end of the chips, as before.
  • A remembered-open row paints open on arrival with no slide; only a user toggle animates (§10 rule).

How

  • Reuses the shared CollapsibleFacetRow (catalog / Requested-skills Category row), which gets one optional collapsedSummary slot. That slot renders in the chips column only while the row is collapsed. The catalog and /requests don't pass it, so they are unchanged. The chip block is now wrapped in a .facet-row-body column (min-width: 0).
  • storedFlagOpen() in lib/facetRow.ts parses the stored flag. The key lives in lib/prefs.ts.
  • Spec: SKILLY_SPEC.md §12 gets a new "Event-type filter (inbox)" entry, and the §10 shared-component note now covers the inbox. Approved before the build.

Tests

  • Unit: facetRow.test.ts covers the own-key flag: only "1" is open; absent, "0" and junk values read as collapsed.
  • e2e: notifications.spec.ts walks the full flow:
    • collapsed and unreachable on a first visit, and the header count matches the chips;
    • expand, reload, still open;
    • select 2, collapse, and the summary shows "2 selected";
    • clear from the summary, and the row stays collapsed;
    • collapsed survives a reload, and a selection is never persisted.
  • pnpm typecheck passes, and all 243 web unit tests pass. Both notifications.spec.ts tests pass locally against the dev stack (no warm-up).

Verified locally

In the browser on the dev stack:

  • collapsed default;
  • expand and collapse, each persisting across reloads;
  • the collapsed summary, aligned with the header;
  • clearing from the summary;
  • phone width, where the summary stacks under the header;
  • the catalog's Category row still renders and aligns as before.

Not in this PR

A pre-existing race in the inbox's loadPage: a slow, superseded types= response can overwrite a newer one when chips are clicked quickly. Reproduced on a cold dev compile. Proposed as a separate fix.

v2.39.1

🤖 Generated with Claude Code

…default (v2.39.1)

The inbox's event-type chips (one per notification type, 33 today) now sit in a
collapsible "Type · 33" row that starts collapsed, so the inbox starts at the top.
The open/closed choice (only that, never the selection) is remembered per browser
under skilly.notifications.types-open. While collapsed with types selected, a
"<k> selected · ✕ clear" summary keeps the filtered inbox explained and clearable.

Reuses the shared CollapsibleFacetRow, which gains an optional collapsedSummary
slot (rendered only while collapsed); the catalog and /requests rows are unchanged.
Spec: SKILLY_SPEC.md §12 "Event-type filter (inbox)" + §10 shared-component note.
Tests: facetRow unit test for the stored flag; notifications e2e for the full flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@krazymir
krazymir merged commit 5afe4d1 into main Oct 20, 2026
9 checks passed
@krazymir
krazymir deleted the claude/collapsible-notification-filters-2570de branch October 20, 2026 11:40
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.

2 participants