refactor: hide-resolved state, persist filter, restore switch CSS#368
Merged
tomasz-tomczyk merged 3 commits intomainfrom Apr 26, 2026
Merged
refactor: hide-resolved state, persist filter, restore switch CSS#368tomasz-tomczyk merged 3 commits intomainfrom
tomasz-tomczyk merged 3 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #368 +/- ##
==========================================
+ Coverage 67.10% 67.16% +0.05%
==========================================
Files 18 18
Lines 7823 7823
==========================================
+ Hits 5250 5254 +4
+ Misses 2181 2178 -3
+ Partials 392 391 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…itch CSS - Restore .comments-panel-switch CSS rules (deleted but still emitted) - Single source of truth for crit-hide-resolved (isHideResolved/setHideResolved) - Persist commentsActiveFilter via localStorage (crit-comments-filter) - Replace applyHideResolved DOM walk with body.hide-resolved + :has() CSS - Make disconnected-banner top responsive via --crit-header-height + ResizeObserver - Add type="button" to filter / toggle / settings pills - Idempotency guard in showDisconnected - Inline tokenize helper (orphaned after diff-match-patch swap) - Extract getAllCommentCards() helper - ARIA: chevron aria-hidden, expand-all aria-pressed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- localStorage is scoped per origin (incl. port); crit defaults to random port so settings reset every invocation. Cookies are host-scoped and survive port changes — match the pattern used by crit-width, crit-theme, crit-diff-mode, crit-toc, etc. - Replace #fff with var(--crit-fg-on-brand) in switch-thumb (stylelint) - Add --crit-header-height to check-css-vars allowlist (set via JS) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filter is a transient view, not a preference. Persisting it would mean coming back to a new review with "resolved only" still active and missing new open comments. Hide-resolved is sticky-by-design (a permanent "never show me resolved" preference); the segmented filter is contextual. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4bbff3d to
7b347da
Compare
3 tasks
tomasz-tomczyk
added a commit
that referenced
this pull request
Apr 26, 2026
#368 migrated crit-hide-resolved from localStorage to a host-scoped cookie (port-stable across crit invocations). Test still asserted the old localStorage value and failed on every run since. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tomasz-tomczyk
added a commit
that referenced
this pull request
Apr 26, 2026
…#369) * refactor: convert comments-panel filter to radiogroup with keyboard nav Ports the a11y fix from crit-web for review-page parity. Replaces the group/aria-pressed pattern with the standard radiogroup semantics: - role="radiogroup" parent; role="radio" + aria-checked + roving tabindex on each filter button - ArrowLeft/Right/Up/Down (wrap), Home/End keyboard navigation - Click + keyboard route through shared activateFilterBtn helper Two other crit-web fixes (panel-creation idempotency, trackedSetTimeout cleanup) don't apply here — crit's frontend is a single-load IIFE with static panel markup and no destroy phase, so the underlying remount / teardown races those fixes address don't exist on this side. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: fix no-useless-assignment lint * test: hide-resolved persists in cookie not localStorage #368 migrated crit-hide-resolved from localStorage to a host-scoped cookie (port-stable across crit invocations). Test still asserted the old localStorage value and failed on every run since. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (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.
Summary
Release audit follow-up addressing frontend findings from v0.10.0..HEAD review.
Fixes:
.comments-panel-switchCSS rules (deleted but still emitted by JS — broken styling)disconnected-bannertopnow responsive via--crit-header-height+ ResizeObserver (was inline-style + stale on resize)showDisconnected(no double banner)type="button"on filter / toggle / settings pills (avoid implicit form submit)Refactors:
crit-hide-resolved(isHideResolved/setHideResolvedaccessors; replaces 4 direct localStorage reads)commentsActiveFiltervia localStorage (crit-comments-filter)applyHideResolvedDOM walk withbody.hide-resolvedbody class +:has()CSS ruletokenizehelper (orphaned after diff-match-patch swap)getAllCommentCards()helperA11y:
aria-hidden="true"(decorative)aria-pressedreflects stateReview
Test plan
🤖 Generated with Claude Code