fix: active-only session filter + paginated "Show N more" (closes #901)#903
Open
swear01 wants to merge 2 commits into
Open
fix: active-only session filter + paginated "Show N more" (closes #901)#903swear01 wants to merge 2 commits into
swear01 wants to merge 2 commits into
Conversation
…nn#901) Add a persisted 'Active sessions only' toggle in Settings -> Display that hides inactive sessions in the sidebar while keeping the selected session visible. Change 'Show N more' to reveal one batch (preview-limit size) per click instead of expanding every hidden session at once, with 'Show less' to collapse back to the initial preview. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
There was a problem hiding this comment.
Findings
- No issues found in the added or modified lines.
Summary
- Review mode: initial
- Reviewed the web-only session sidebar/settings changes against the surrounding route and session-list behavior. Residual risk: I did not execute the PR code or tests in this automation review.
Testing
- Not run (automation)
HAPI Bot
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.
Closes #901
Summary
Two web-only sidebar improvements for repos that accumulate many inactive sessions:
"Active sessions only" toggle (Settings → Display). A persisted, default-off preference that hides inactive sessions in the sidebar. The currently-selected session stays visible even if inactive, so toggling never yanks your open session away. Mirrors the existing
useSessionListStatusMode/useSessionPreviewLimitlocalStorage prefs.Paginated "Show N more". Previously one click expanded every hidden session at once, which is jarring in a long repo. Now each click reveals one batch (size = the existing session preview limit), and once everything is shown the button becomes "Show less" to collapse back to the initial preview.
These are complementary: the toggle is a hard filter for people who only care about live sessions, while pagination improves browsing for people who do want the full history.
Changes
web/src/hooks/useShowActiveSessionsOnly.ts(new) — localStorage-backed boolean pref with cross-tab sync.web/src/components/SessionList.tsx—filterActiveSessionsOnly()(keeps selected), and per-group reveal-cap pagination viagetNextSessionVisibleCount()replacing the binary expand.web/src/routes/settings/index.tsx— toggle row in Display, reusing the existing switch style.web/src/lib/locales/{en,zh-CN}.ts— new strings.Test plan
SessionList.test.ts29/29 (6 new: active-only filter + pagination helper)tsc --noEmitclean