Skip to content

fix(models): normalize mobile tab spacing and stabilize Combos layout - #3374

Closed
lidge-jun wants to merge 4 commits into
devfrom
codex/carry-3333
Closed

fix(models): normalize mobile tab spacing and stabilize Combos layout#3374
lidge-jun wants to merge 4 commits into
devfrom
codex/carry-3333

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Carried from #3333 by @blackjune67 onto current dev, with the author's Co-authored-by trailer on the commit.

The Models page keeps its panels mounted and toggles hidden, so width rules written against panel contents behaved differently depending on what had loaded and what had been visited. Two concrete consequences:

  • The catalog column gated on .models-workspace-shell, which is absent during the loading skeleton and after a cold failure. The tab rendered at 980px and snapped to 1200px once data arrived.
  • Routing had no rule of its own, so it fell back to 980px — a visible jump on every hop, and one that only disappeared once the compatibility tab had leaked its own 1200px in.

Scoping to #models-panel-catalog:not([hidden]) and #models-panel-routing:not([hidden]) holds the width across load, empty, and error, and cannot leak to another tab.

Models tab width stability before and after

Widths in that capture are read from getBoundingClientRect() against this branch's stylesheet, not annotations.

Separately, the Combos page renders its loading and error states without the workspace shell, so full-bleed styling applied to them produced the wrong flow; that is now limited to the actual workspace, with boxed fallback restored.

Closes #3333

Verification

cd gui && bun test tests/models-tab-layout.test.ts    1 pass, 0 fail
bun run typecheck                                     exit 0

RED without the patch: the asserted selectors do not exist on current dev. Worth stating plainly for the reviewer — this is a CSS-source contract test, so it locks the declarations rather than the rendered pixels; the capture above is the rendered evidence.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (Styling only.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: blackjune67 46661504+blackjune67@users.noreply.github.com

Carried from #3333 onto current dev. Independent of the other carried
fixes, so it ships as its own PR rather than a stack layer.

Co-authored-by: hajune <june@smartix.co.kr>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 3, 2026 17:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T17:13:53.841404Z aa130a6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the bug Something isn't working label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 9 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 20c46f16-8cb1-495a-8523-d33122efdc9e

📥 Commits

Reviewing files that changed from the base of the PR and between aa130a6 and 16b358d.

⛔ Files ignored due to path filters (1)
  • docs/pr-assets/models-tab-width-stability.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • gui/src/styles.css
  • gui/tests/dashboard-tabs.test.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 51635f58-d2d5-48d2-80ab-1e9de9bf3cbf

📥 Commits

Reviewing files that changed from the base of the PR and between 664d80c and aa130a6.

📒 Files selected for processing (4)
  • gui/src/styles-compatibility-matrix.css
  • gui/src/styles-models-workspace.css
  • gui/src/styles.css
  • gui/tests/models-tab-layout.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes stabilize Models and Combos layout sizing, spacing, alignment, and fallback states across desktop and mobile viewports. They also adjust log detail controls and table-cell overflow behavior, with CSS regression coverage for Models tab layouts.

Changes

Models and Combos layout

Layer / File(s) Summary
Combos fallback and spacing
gui/src/styles.css
Lines 453–491 align the Models tab strip and restore boxed, normal-flow layout when .combos-workspace-shell is absent. Lines 2368–2389 add the matching mobile spacing rules.
Models panel widths and validation
gui/src/styles-models-workspace.css, gui/src/styles-compatibility-matrix.css, gui/tests/models-tab-layout.test.ts
Lines 11–35 keep Catalog, Routing, and Compatibility panels at a 1200px max-width based on the visible panel. The test covers widths, spacing, alignment, and shell-free states.

Log content layout

Layer / File(s) Summary
Log content display
gui/src/styles.css
Lines 2049–2054 prevent log detail button text from wrapping and remove cell-level clipping for overlong table content.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to aa130

This change stabilizes Models and Combos sizing, alignment, and fallback presentation without any identified current-head merge risk.

Suggested reviewers: wibias

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes are within scope, but gui/src/styles.css also changes log styling: .log-detail-btn uses white-space: nowrap, .logs-table tbody td no longer uses overflow: hidden, and `.log-detail… Remove the unrelated log styling changes from gui/src/styles.css, or link a separate issue and provide a clear justification and regression coverage for those log behavior changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR satisfies the coding objectives in issue #3333. It aligns the Combos tab strip, scopes Models panel widths to visible panels, stabilizes loading, empty, and error layouts, adds mobile fallback …
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the mobile tab-spacing updates and Combos layout stabilization. It does not mention the Models panel width fixes, but it clearly identifies major changes in the pull req…
Full details: Linked Issues check

Explanation

The PR satisfies the coding objectives in issue #3333. It aligns the Combos tab strip, scopes Models panel widths to visible panels, stabilizes loading, empty, and error layouts, adds mobile fallback rules, and adds regression coverage in gui/tests/models-tab-layout.test.ts.

Full details: Out of Scope Changes check

Explanation

Most changes are within scope, but gui/src/styles.css also changes log styling: .log-detail-btn uses white-space: nowrap, .logs-table tbody td no longer uses overflow: hidden, and .log-detail-btn no longer uses text-align: left. These changes are unrelated to issue #3333 and are not covered by its objectives.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 unsupported.)

Full details: Title check

Explanation

The title accurately describes the mobile tab-spacing updates and Combos layout stabilization. It does not mention the Models panel width fixes, but it clearly identifies major changes in the pull request.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/carry-3333

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa130a6563

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread gui/src/styles.css Outdated
zh-TW's 檢視詳細資料 would lose its tail in the 8% status column. */
white-space: normal;
text-align: left;
white-space: nowrap;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore the Logs overflow containment rules

When the fixed-layout Logs table contains a long cost, model, reasoning value, or translated details label, this hunk removes the body-cell clipping and reasoning wrapping rules while forcing the button back to nowrap, so content can paint over adjacent columns. The existing gui/tests/logs-table-overflow.test.ts regression test now fails both containment assertions; restore the removed overflow and wrapping declarations.

AGENTS.md reference: gui/AGENTS.md:L46-L50

Useful? React with 👍 / 👎.

Comment thread gui/src/styles.css
.main-inner.main-inner--combos > .page-sub { margin-bottom: 10px; }

/* Keep the Models tab strip border aligned with its tab buttons in the full-bleed layout. */
.main-inner.main-inner--combos > .page-tabs {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the base page-tabs source match

When gui/tests/dashboard-tabs.test.ts runs, it locates the first literal .page-tabs { block in this stylesheet; placing this scoped selector before the base .page-tabs rule makes the test inspect this margin-only block and fail because flex-wrap: wrap is absent. Move this scoped declaration below the base rule or update the source-contract test to match the exact selector so the required GUI test gate passes.

AGENTS.md reference: gui/AGENTS.md:L46-L50

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

Hygiene

Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft September 3, 2026 17:14
Rendered against the branch stylesheet; the measured widths are read from getBoundingClientRect, not drawn.
@github-actions
github-actions Bot marked this pull request as ready for review September 3, 2026 17:26
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 58 / 80

이 PR은 Models / Combos 탭의 가로 폭이 탭마다, 로딩 상태마다 들쭉날쭉하던 문제를 고치려 합니다. 지금 dev HEAD(664d80c76, #3367 직후)에서 Models 패널은 마운트를 유지한 채 hidden만 바꿉니다. 그래서 폭 규칙을 “패널 안의 어떤 내용이 있는가”에 걸면, 스켈레톤·에러·아직 안 열어 본 탭에서 폭이 달라집니다. 본문이 말한 대로 카탈로그는 .models-workspace-shell이 있을 때만 1200px가 되어, 로딩·실패 때는 980px로 갔다가 데이터가 오면 1200px로 튀었습니다. 라우팅 탭은 자기 규칙이 없어 980px로 떨어졌고, 호환성 탭이 한 번 1200px를 새면 그 누수가 다른 탭에도 보였습니다. Combos는 main-inner--combos full-bleed가 탭 선택만으로 켜지는데, 로딩·에러는 .combos-workspace-shell 없이 렌더되어 부제·재시도 버튼이 화면 끝까지 늘어졌습니다.

고치는 방향의 핵심은 좋습니다. gui/src/styles-models-workspace.css에서 카탈로그·라우팅 폭을 #models-panel-catalog:not([hidden]) / #models-panel-routing:not([hidden])에 걸고, 호환성도 같은 방식으로 맞춥니다. gui/src/styles.css에서는 Combos 탭 스트립에 margin-inline을 줘서 테두리와 버튼을 맞추고, .main-inner--combos:not(:has(.combos-workspace-shell))일 때는 full-bleed를 끄고 1200px 박스로 되돌립니다. 주석에 적은 Rolldown CSS 미니파이어 이슈(콤마로 이은 :not(:has(...)) 선택자가 깨짐) 때문에 선택자를 하나씩 나눈 것도 설득력 있습니다. 테스트 gui/tests/models-tab-layout.test.ts는 CSS 선언 계약을 잠급니다. 픽셀 스냅샷은 아니지만, 본문 스크린샷이 렌더 증거를 보완합니다. 원본은 @blackjune67#3333 carry이고 Co-authored-by가 있습니다.

다만 이 브랜치의 gui/src/styles.css diff가 #3367이 방금 넣은 Logs 테이블 겹침 클립을 지웁니다. 현재 dev에는 .logs-table tbody td { overflow: hidden; }, .log-reasoning-cell { overflow-wrap: anywhere; }, 그리고 zh-TW 등 긴 “상세 보기” 라벨을 위해 log-detail-btnwhite-space: normaltext-align: left, :focus-visible outline이 있습니다. #3374 diff는 이 규칙들을 삭제하고 log-detail-btn을 다시 white-space: nowrap으로 되돌립니다. merge-base가 664d80c76(#3367)인데도 Logs 구간이 빠져 있으므로, Models/Combos 작업과 무관한 회귀입니다. 이 상태로 머지하면 #3367이 고친 “US$0.1401claude-…” 겹침과 effort 캡션 겹침이 다시 열립니다. 우선순위를 낮춘 이유입니다.

그 외에는 types/config 분할과 무관하고, GUI 레이아웃 범위도 본문 설명과 대체로 맞습니다. CSS 소스 계약 테스트라 브라우저 미니파이 결과를 직접 검증하지는 않지만, 선택자 문자열을 잠그는 용도로는 충분합니다. Combos 셸 없는 상태의 모바일 패딩 오버라이드도 같이 들어 있습니다.

gui/src/styles.css Logs 구간 (#3367이 넣은 .logs-table tbody td overflow hidden / .log-reasoning-cell / log-detail-btn wrap) - 이 PR diff가 삭제합니다. Models/Combos 수정과 무관한 회귀입니다. 머지 전에 반드시 복구하세요.

gui/src/styles-models-workspace.css - #models-panel-catalog:not([hidden]) / #models-panel-routing:not([hidden])로 1200px를 고정하는 방향은 현재 dev 패널 hidden 토글 방식과 맞습니다.

gui/src/styles.css .main-inner--combos:not(:has(.combos-workspace-shell)) - 로딩·에러에서 full-bleed를 끄는 규칙은 본문 증상(“콤보만 영역이 이상해짐”)과 맞습니다. Rolldown 미니파이 주석도 타당해 보입니다.

gui/tests/models-tab-layout.test.ts - CSS 선언 계약만 잠급니다. Logs 클립 회귀는 이 테스트가 잡지 못합니다.

원본 #3333 - 머지 후 자동 close 또는 landed-via 정리가 필요합니다.

메인테이너의 판단이 필요한 지점

너의 추천
레이아웃 의도는 맞지만, 지금 헤드 그대로는 머지하지 마세요. #3367이 넣은 Logs overflow clip / reasoning wrap / detail-btn wrap을 복구한 커밋을 올린 뒤(또는 그 삭제가 없는 새 carry로) 다시 머지하세요. 복구 후에는 #3333을 landed-via로 정리하면 됩니다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun

Copy link
Copy Markdown
Owner Author

Attribution correction on this carry PR, noted during a backlog review.

The Co-authored-by trailer named hajune <june@smartix.co.kr>, which is the git identity on the commits in #3333 but is not the GitHub account that authored the PR. GitHub matches co-author trailers by account-linked email, so that address credits nobody: @blackjune67 would not have appeared on the contributor graph for their own work.

The trailer in this description now reads:

Co-authored-by: blackjune67 <46661504+blackjune67@users.noreply.github.com>

Before squashing this PR, make sure the merge commit carries that exact trailer rather than the smartix.co.kr address. missing_coauthor_credit in .github/scripts/pr-carry-attribution.cjs checks that a trailer is present; it cannot tell that a present trailer points at an unlinked identity, which is how this got through.

Original work by @blackjune67 in #3333.

jun added 2 commits September 4, 2026 02:31
CI caught this: the carried Models/Combos styling adds a scoped
`.main-inner--combos > .page-tabs` rule above the base one, and the dashboard
guard located its target with a bare indexOf(".page-tabs {") — which matches any
rule whose selector merely ENDS in that string. It read the new scoped block,
found no flex-wrap, and failed on a declaration nothing had touched.

Anchoring the search to a line-start .page-tabs rule fixes the guard without
weakening it: removing flex-wrap from the real base rule still fails the test.
CI was right and my earlier read of it was wrong. #3333 predates #3367, so
taking gui/src/styles.css wholesale from the PR head silently reverted the
newer Logs fix: .logs-table tbody td { overflow: hidden }, the
.log-reasoning-cell wrap rule, and the .log-detail-btn wrapping that #3367
added on top. tests/logs-table-overflow.test.ts caught exactly that.

This is the hazard in carrying a whole file rather than a diff, and it is why
the guard test earned its keep.
lidge-jun pushed a commit that referenced this pull request Sep 3, 2026
CI caught a real regression I introduced while rebuilding this branch: I took
the nine i18n catalogs wholesale from the old branch, which silently reverted
every key dev had added since — sidebar.preferences among them — and broke the
GUI build's TKey union.

The catalogs are now restored from dev with only the two device keys added on
top. bun run build:gui passes, as do locale parity and fr-localization.

Same root cause as the Logs styles revert on #3374: carrying a whole file
instead of a diff takes the file's history with it.
@lidge-jun

Copy link
Copy Markdown
Owner Author

Superseded: this branch copied gui/src/styles.css wholesale, which silently reverted the Logs clipping fix (#3367) and the sidebar footer rework (#3382). Rebuilt from the PR diff on current dev.

@lidge-jun lidge-jun closed this Sep 3, 2026
@lidge-jun
lidge-jun deleted the codex/carry-3333 branch September 3, 2026 17:51
lidge-jun added a commit that referenced this pull request Sep 3, 2026
…d an account (#3385)

* fix(codex,cli,gui): surface the device login so a headless hub can add an account

The deviceauth grant landed in #3369 but nothing could reach it: openai/codex/
chatgpt route through the Codex-auth API, which dropped deviceCode from the
start DTO and handed every non-empty URL to a local browser.

- POST /api/codex-auth/login accepts device: true, returns deviceCode, and
  skips the browser open when one is present -- the verification page belongs
  on the user's other machine, and on a headless host the spawn fails anyway.
- ocx account login openai --device prints the URL, the code, and the flow id,
  and keeps them under --no-wait --json. kimi/nous/github-copilot accept the
  flag as a no-op because their only login is already a device flow.
- The Codex modal gets its own "Device code login" row, and a reauth (which
  skips the pick step) can switch to it from the waiting step.

Both poll budgets go to 480 attempts. The grant lives 15 minutes and the point
is that the operator walks to another device; the old 5-minute budget would
have killed the flow while its code was still valid, and the extra 30 attempts
cover the token exchange after the final poll.

Rebuilt on current dev after #3369 squash-merged.

Refs #3366

* fix(gui): re-add the device strings without reverting newer locale keys

CI caught a real regression I introduced while rebuilding this branch: I took
the nine i18n catalogs wholesale from the old branch, which silently reverted
every key dev had added since — sidebar.preferences among them — and broke the
GUI build's TKey union.

The catalogs are now restored from dev with only the two device keys added on
top. bun run build:gui passes, as do locale parity and fr-localization.

Same root cause as the Logs styles revert on #3374: carrying a whole file
instead of a diff takes the file's history with it.

---------

Co-authored-by: jun <jun@lidge.dev>
@lidge-jun lidge-jun added the landed-via-maintainer Original PR closed after landing via a maintainer merge train label Sep 3, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

Landed via #3386 at a333811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working landed-via-maintainer Original PR closed after landing via a maintainer merge train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant