Skip to content

feat(viewer): collapse secondary session sections - #738

Merged
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
Linxiushen:feat/viewer-collapsible-sections
Aug 6, 2026
Merged

feat(viewer): collapse secondary session sections#738
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
Linxiushen:feat/viewer-collapsible-sections

Conversation

@Linxiushen

Copy link
Copy Markdown
Contributor

Description

Keep review findings prominent by collapsing the three secondary session details by default:

  • per-file token usage
  • files reviewed
  • raw LLM conversations

The Viewer uses native details elements and the existing disclosure styling, so each section remains keyboard-accessible and can be expanded without JavaScript. Review Comments and their file groups remain open. Count badges keep the hidden scope visible at a glance, and the token table is placed in an overflow-safe body for narrow screens.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • Focused Viewer template/static tests
  • go vet ./...
  • Manual browser testing at desktop and mobile widths

The regression test verifies all three secondary sections render closed while Review Comment file groups remain open. Browser checks confirmed the sections stay closed at 1265px and 390px widths and expand normally when activated.

go test ./internal/viewer also reaches three existing permission-mode assertions that are not portable to Windows (TestHandleRepos_PermissionDenied, TestDiscoverRepos_SkipsUnreadableSubdir, and TestListSessions_SkipsUnreadableFiles). The focused Viewer rendering tests pass.

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove the new default state
  • Relevant tests pass locally with my changes
  • Documentation is unchanged because the controls use native disclosure behavior
  • I have signed the CLA

Related Issues

Closes #734

@CLAassistant

CLAassistant commented Aug 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 6 issue(s) in this PR.

  • ✅ Successfully posted inline: 6 comment(s)

Comment thread internal/viewer/static/style.css
Comment thread internal/viewer/templates/session.html
Comment thread internal/viewer/templates/session.html
Comment thread internal/viewer/templates/session.html
Comment thread internal/viewer/templates/session.html
Comment thread internal/viewer/templates/session.html

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 34fe79f into alibaba:main Aug 6, 2026
11 checks passed
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.

Suggestion: viewer should collapse all sections except Review Comments

3 participants