Skip to content

Keep the project name on the Overview header at narrow widths - #626

Merged
yansfil merged 4 commits into
mainfrom
fix/overview-header-narrow
Oct 6, 2026
Merged

yansfil merged 4 commits into
mainfrom
fix/overview-header-narrow

Conversation

@yansfil

@yansfil yansfil commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #618

Summary

창 폭 720px에서 Project Overview 헤더가 All projects /만 남기고 프로젝트 이름을 잃었습니다.
원인은 오른쪽 두 버튼이 줄지 않고 폭을 먼저 가져가는 구조입니다. 헤더 내용 폭 348px에서 버튼 227px과 gap 48px를 빼면 위치 표시가 73px만 받고, All projects /가 그 폭을 다 쓰면 truncate인 이름 칸이 0px이 됩니다(측정: 같은 화면에서 이름이 1600px에서 55px, 720px에서 0px).

  • 이름이 헤더 줄에서 먼저 자리를 받습니다. New agent와 New issue는 이름 전체가 옆에 들어갈 때만 단어와 C를 보이고, 아니면 아이콘만 남깁니다.
  • 기준은 고정 폭이 아니라 측정입니다: 이름의 자연 폭, 단어가 있는 버튼들의 자연 폭(보이지 않는 복사본), 줄의 폭. 그래서 이름 길이, 언어, 사이드바 폭에 맞춰 바뀝니다.
  • 아이콘만 남았을 때만 hint가 열리고(이름, New issue는 C까지), disabled 버튼 위에서도 열립니다.
  • 줄은 새 web/src/OverviewTitleRow.tsx로 나눴고, Hint에 active를 더했습니다.

720px 전: 이름이 사라지고 버튼은 단어 그대로
720px 후: 이름이 남고 버튼은 아이콘

위가 전, 아래가 후입니다. All projects / 뒤에 이름이 있는지, 오른쪽 두 버튼이 아이콘인지 보세요(전에는 이름 폭이 0이었습니다).

Review

  • 판단해 주세요: 단어를 아이콘으로 바꾸는 기준이 "이름 전체가 들어가는가"입니다. 긴 이름은 1600px보다 좁으면 아이콘만 남습니다. 이름이 우선이라는 이슈의 기대와 맞는지.
  • 조심해서 볼 파일: web/src/OverviewTitleRow.tsx - ResizeObserver로 측정해 상태를 바꾸는 high-frequency 가까운 경로입니다. 측정 입력(줄 폭, 이름의 자연 폭, 복사본 폭)이 현재 상태에 의존하지 않아 되돌아가며 흔들리지 않고, observer는 줄, 복사본, nav 자식만 봅니다.
  • 조심해서 볼 파일: web/src/components/ui/tooltip.tsx - Hint의 active는 열기만 막고 닫기는 항상 통과시킵니다.
  • 비용 검토: 입력당 추가 작업은 resize와 이름 변경 때 레이아웃 읽기 한 번입니다. 상시 타이머나 구독은 없고, effect가 observer를 소유해 unmount와 deps 변경에서 끊습니다.

Evidence

  • 확인한 것: 새 spec은 긴 프로젝트 이름(58자)으로 다크와 라이트 각각 1600, 900, 720px에서 이름 폭이 --size-tab-title-min(104px) 이상, 1600에서만 전체 이름과 단어, 900과 720에서 말줄임과 아이콘, 페이지가 가로로 스크롤되지 않음을 봅니다. 상태는 expect.poll로 기다립니다.
  • 확인한 것: 같은 spec이 hint를 봅니다: 아이콘 위에서 New issue와 keycap C, 비활성 처리한 New agent 위에서도 열림, 단어가 보이는 1600에서는 500ms 지연 뒤에도 안 열림.
  • 확인한 것: 원래 소스로 되돌리면 spec이 실패합니다(900px에서 단어가 안 줄어듦). 전/후 캡처는 같은 spec 흐름으로 찍었습니다.
  • 확인한 것: web typecheck, lint, unit test, build와 desktop typecheck, lint, node scripts/check-design-contract.mjs가 통과합니다. overview-header, overview-modal, overview-requests, overview, overview-prs, checkout-pr, sidebar-shell spec 8개가 통과합니다.
  • 확인하지 못한 것: 원격 장치 Badge. Badge는 이름과 함께 줄어들도록(shrink) 했지만 원격 장치를 가진 fixture가 없어 실제 폭은 보지 못했습니다.
  • 확인하지 못한 것: 사이드바 최대 폭(440px)과 가장 좁은 창의 조합, 텍스트 배율, 한국어 UI 언어는 직접 열어 보지 않았습니다. 측정 규칙은 단어 폭을 재므로 언어에 의존하지 않는다는 것이 근거입니다.
  • 확인하지 못한 것: New agent가 실제로 disabled인 프로젝트는 fixture로 만들 수 없어 DOM에서 disabled를 켜 hint를 확인했습니다.
  • 생성물: 없음. 새 token도 없습니다(--size-tab-title-min은 spec의 기준값으로만 읽습니다).
추가 증거

720px 라이트 전/후:

720px 라이트 전
720px 라이트 후

900px 다크 전/후(긴 이름이 있어 후에서는 아이콘):

900px 다크 전
900px 다크 후

900px 라이트와 1600px(단어와 C가 전부 보임):

900px 라이트
1600px 다크
1600px 라이트

Verification record
  • Head: 626401b
  • bash scripts/verify-web.sh web typecheck|lint|test|build, desktop typecheck|lint: 통과
  • node scripts/check-design-contract.mjs: 통과
  • pnpm --dir web exec playwright test 위 spec 7개 파일(8 test): 8 passed
  • 독립 리뷰 두 번(별도 subagent, 코드 읽기만). 두 번째의 Fix now 5건: 측정 복사본이 페이지 가로 스크롤을 만들 수 있음(복사본을 줄에 clip해 수정), Hint active가 닫기까지 막음(열기만 막도록 수정), 음성 단언이 지연보다 먼저 통과함(quietFor 800ms), 근거 없는 헤더 폭 단언(삭제), disabled 검증이 DOM을 직접 바꾼다는 사실(주석에 명시, 실제 disabled fixture는 없음). Follow-up: Badge 말줄임과 hint, column-gap 변화에 대한 재측정은 하지 않았습니다.
  • 첫 리뷰(Keep the project name on the Overview header at narrow widths #626 lead 12건)의 처리: 1 상태를 poll, 2 고정 512px를 측정으로 교체, 3 hint는 아이콘일 때만, 4 disabled도 span에서 hint, 5 sr-only span은 유지(hint가 이제 aria-label을 달지 않고 span이 아이콘 상태의 접근 가능한 이름), 6 container query 제거, 7 폭 가정을 측정 규칙으로 대체하고 페이지 스크롤을 단언, 8 긴 이름으로 재현, 9 hint 안의 C 단언, 10 chooseTheme을 wire.ts 하나로(다섯 복사본 제거), 11 non-null 단언 제거, 12 문서를 실제 동작에 맞춤.
  • 변경 경로: web/src/OverviewTitleRow.tsx(새), web/src/ProjectOverview.tsx, web/src/components/ui/tooltip.tsx, web/e2e/overview-header.spec.ts(새), web/e2e/wire.ts와 spec 다섯 개, docs/UI_BEHAVIOR.md, docs/DESIGN_WORKFLOW.md

At 720 px the Overview header's content is 348 px wide. The path back's
"All projects /" and the two action buttons, which never shrink, left the
project name 0 px, so the header read "All projects /" alone.

The header is now a size container: under 512 px New agent and New issue
keep their icon and drop their word and keycap, with their name and the
shortcut in a hint, so the name keeps the row and truncates only after that.

Closes #618
…n icon-only actions

The actions now keep their word and keycap only while the whole project name
fits beside them, measured from the name and the labelled actions rather than
a fixed width, so a long name, another language, a device badge or a wide
sidebar cannot take the name to zero again. The hint opens only while an
action is icon-only, over a span so it also opens on a disabled one.

The spec uses a long project name and polls the state it asserts; the theme
chooser the Overview specs each copied is one helper in wire.ts.
…oll, and close a hint that was open when it went inactive

The copy of the labelled actions that the title row measures is clipped to the
row, so it cannot give the Overview a horizontal scrollbar beside a wide
sidebar. A hint that is open when its action stops needing it still closes.
The spec waits out the hint delay with a stated quiet window, reads the
keycap in the hint itself, and checks the page that scrolls.
@yansfil
yansfil merged commit e4da941 into main Oct 6, 2026
18 checks passed
@yansfil
yansfil deleted the fix/overview-header-narrow branch October 6, 2026 09:54
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.

좁은 창(720px)에서 Project Overview 헤더에 프로젝트 이름이 사라짐

1 participant