Skip to content

fix(web): polish session search and ordering#551

Open
oodavy41 wants to merge 1 commit intotiann:mainfrom
oodavy41:fix/web-session-search-input
Open

fix(web): polish session search and ordering#551
oodavy41 wants to merge 1 commit intotiann:mainfrom
oodavy41:fix/web-session-search-input

Conversation

@oodavy41
Copy link
Copy Markdown
Contributor

Summary

  • align the session list search icon and custom clear button with the input center
  • hide the browser-native search cancel button to avoid duplicate clear buttons
  • keep collapsed session previews ordered by activity instead of promoting the selected session
  • auto-expand the selected session's preview group so deep-linked sessions remain visible

Testing

  • bun --cwd web typecheck
  • bun --cwd web test --run src/components/SessionList.test.ts

Align session search controls, hide the native search clear button, and keep collapsed session previews ordered by activity while still expanding previews for the selected session.
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Major] Selected sessions past the preview limit can remain hidden — isSessionGroupExpanded treats a missing sessions::... override as collapsed, and a false override as expanded. The new effect deletes a collapsed preview override instead of setting the expanded state, so after removing selected-session promotion a deep-linked selected session beyond the first 8 rows still is not rendered. Evidence web/src/components/SessionList.tsx:796.
    Suggested fix:
    const isPreviewExpanded = prev.get(sessionPreviewKey) === false
    if (!isPreviewExpanded) {
        next.set(sessionPreviewKey, false)
        changed = true
    }

Summary
Review mode: initial
One issue found: selected-session auto-expansion does not actually expand collapsed session previews because this collapse key uses inverted boolean semantics. Residual testing gap: no component/helper coverage for a selected session beyond GROUP_SESSION_PREVIEW_LIMIT becoming visible.

Testing
Not run (automation; review-only and PR code treated as untrusted).

HAPI Bot

}
// Expand session preview so deep-linked/selected sessions past the preview limit remain visible
const sessionPreviewKey = `sessions::${group.key}`
if (prev.has(sessionPreviewKey) && prev.get(sessionPreviewKey)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MAJOR] Selected sessions past the preview limit can remain hidden. isSessionGroupExpanded treats a missing sessions::... override as collapsed, and a false override as expanded; deleting the key here leaves the default collapsed state in place, so a deep-linked selected session beyond the first 8 rows still is not rendered after selected-session promotion was removed.

Suggested fix:

const isPreviewExpanded = prev.get(sessionPreviewKey) === false
if (!isPreviewExpanded) {
    next.set(sessionPreviewKey, false)
    changed = true
}

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