Skip to content

Tell the focused session row apart and keep it in view in Sessions - #1042

Merged
yansfil merged 1 commit into
mainfrom
fix/session-focus-visibility
Oct 13, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/session-focus-visibility

Conversation

@yansfil

@yansfil yansfil commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

사이드바와 Sessions에서 포커스된 세션 행이 마우스를 올린 행과 같은 회색이라 어디가 포커스인지 구분되지 않았습니다(--secondary = --accent).
선택 행은 이제 고른 강조색을 --opacity-selected-fill(12%)로 깐 --color-selected를 쓰고, hover는 그대로 회색입니다.
또 사이드바는 포커스가 움직이면 그 행을 화면 안으로 스크롤하는데 Sessions는 하지 않았습니다.
Sessions도 같은 규칙(필요한 만큼만, 같은 행이 선택된 동안은 다시 안 함)으로 선택 행을 보이게 하고, 두 줄짜리 행은 둘째 줄까지 들어오게 합니다.

Sessions before/after
맨 아래 행(쉬는 세션)에 포커스, 가운데 행에 마우스. Before는 포커스 행이 화면 밖이고, After는 스크롤되어 강조색 행과 회색 hover 행이 갈립니다.

Review

  • 판단해 주세요: 선택 표시를 강조색 12% 틴트로 바꾼 것(운영자가 후보 비교 후 고름). 다크·라이트 모두 이 세기로 충분한지.
  • 판단해 주세요: 적용 범위는 사이드바의 위치 행(Overview, Factory, 프로젝트, checkout, 에이전트)과 Sessions 행뿐입니다. Explorer, History, PR 목록, Settings 목록의 선택은 회색 그대로입니다.
  • 조심해서 볼 파일: web/src/sidebarFocus.ts - 사이드바 스크롤 규칙에서 revealRow를 분리했습니다. 사이드바 동작은 그대로여야 합니다.
  • 조심해서 볼 파일: web/src/index.css - --color-selected는 tokens.json이 아니라 기존 토큰(--primary, --opacity-selected-fill)의 color-mix로 만든 파생 색입니다. tokens.json의 색 토큰은 hex만 받아서 고른 강조색을 따라갈 수 없기 때문입니다.

Evidence

  • 확인한 것: gallery의 실제 Sidebar·AgentSessions 렌더(다크·라이트)에서 선택 행은 oklab(… / 0.12) 강조색, hover 행은 회색으로 계산됨.
  • 확인한 것: 같은 Sessions 장면에서 맨 아래 행에 포커스를 주면 목록이 0에서 251px 스크롤되고 행 전체가 목록 안에 들어옴. 운영자가 맨 위로 되돌린 뒤 같은 포커스로 스냅샷이 와도 0에 머묾.
  • 확인한 것: 새 web/src/sessionsFollowsFocus.test.tsx는 effect를 지우거나 "같은 행이면 다시 스크롤 안 함" 조건을 지우면 실패함(각각 심어서 확인).
  • 확인한 것: verify-web.sh web typecheck, lint, test(1483 통과), build와 check-design-contract.mjs 통과.
  • 확인하지 못한 것: 실제 데이터가 든 앱 창에서의 확인과 로컬 web e2e. 캡처는 gallery의 합성 데이터입니다.
  • 확인하지 못한 것: Pen 라이브러리와 Screen 시트는 아직 선택 행을 $--secondary로 그립니다. Pen 앱이 열려 있어 디스크 쓰기가 덮일 위험 때문에 이 PR에서는 손대지 않았습니다.
추가 증거

사이드바: 후속 UX 계획 인터뷰에 포커스, 사이드바 가독성 개선에 마우스. Before는 둘이 같은 회색, After는 포커스 행만 강조색.

Sidebar before/after

The row standing for the focus was filled with --secondary, the same color
as a hovered row's --accent, so in the sidebar and in Sessions the operator
could not tell where the focus was. It now takes --color-selected, the chosen
accent at --opacity-selected-fill, across the sidebar's place, project,
checkout and agent rows and the Sessions rows.

Sessions selected the focused pane's row but never scrolled to it, while the
sidebar did. Sessions now brings its selected row in by the sidebar's rule
(revealRow, split out of revealSidebarFocus): as little as needed, the whole
row with its second line, and not again while the same row stays selected.
@yansfil
yansfil merged commit 1842593 into main Oct 13, 2026
19 checks passed
@yansfil
yansfil deleted the fix/session-focus-visibility branch October 13, 2026 05:49
yansfil added a commit that referenced this pull request Oct 13, 2026
Related: #1042

## Summary

PR #1042에서 바뀐 사이드바·Sessions 선택 채움을 디자인 라이브러리와 Screen 시트에도 맞췄습니다.
기본 강조색 12% 틴트 `--color-selected`를 테마별로 등록하고 생성기에서 참조합니다.

![Sessions 선택 행
전후](https://github.com/yansfil/pr-assets/blob/main/modakbul-gongbang-hide/pen-selected-fill/6e508d5/sessions-before-after.png?raw=true)
`로그 확인` 선택 행만 라임 틴트로 바뀌고 이웃 행은 그대로입니다. 위는 Light, 아래는 Dark입니다.

## Review

- **판단해 주세요**: 두 테마에서 선택 행이 중립색 hover와 구분되며 기존 코드의 12% 틴트와 맞는지.
- **조심해서 볼 파일**: `scripts/pen-token-map.json`과 `pen-screens.mjs`는 새 변수를
기록·복사하고 공용 중립 wash를 유지합니다.
- **범위**: 공용 Agent identity·Tree interaction의 Selected 예시는 포함하고, 대화 기록의
`Session row`는 유지합니다.

## Evidence

- **확인한 것**: JSON 구조 비교에서 라이브러리 5개 행의 fill과 새 변수만 변경됐습니다.
- **확인한 것**: Screen의 Main 4개, Projects Sidebar 4개, Factory 30개 행의 fill과
새 변수만 변경됐습니다.
- **확인한 것**: ID·배치·크기·descendants·텍스트는 그대로이며 다른 시트·토큰·hover·탭·칩·Settings
선택도 그대로입니다.
- **확인한 것**: Light·Dark PNG에서 선택 틴트를 확인했고 Explorer Git·대화 기록 시트는 전후 픽셀이
같습니다.
- **확인한 것**: `check-design-contract.mjs` 통과, 디자인 관련 기존 테스트 83개 통과, 재생성 두
번 모두 변경 없음.
- **확인하지 못한 것**: 실제 앱·gallery 비교와 Windows/Linux 렌더는 실행하지 않았습니다. PNG는
디자인의 기본 라임만 그립니다.
- **생성물**: `hide-screens.pen`은 3개 Screen 시트의 선택 fill만 바뀐 생성물입니다.

<details><summary>추가 증거</summary>

![사이드바 선택 행
전후](https://github.com/yansfil/pr-assets/blob/main/modakbul-gongbang-hide/pen-selected-fill/6e508d5/sidebar-before-after.png?raw=true)
`main` checkout의 선택 fill만 바뀌었습니다.

![라이브러리 선택
상태](https://github.com/yansfil/pr-assets/blob/main/modakbul-gongbang-hide/pen-selected-fill/6e508d5/library-selected-states.png?raw=true)
변경한 Component 5개의 Light·Dark 선택 상태입니다. 투명 배경 시트는 해당 테마 background 위에
합성했습니다.

</details>
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