Skip to content

Desktop frontend contract: follow the media header links to their icon buttons - #15550

Merged
danielhanchen merged 1 commit into
mainfrom
ci-media-header-contract-icon-links
Oct 27, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-media-header-contract-icon-links

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Two checks in tests/studio/test_desktop_reliability_frontend_contract.py fail on main since #15520 (Repo tests (CPU, studio), e.g. job 122142458511 on #15535):

test_compact_media_link_keeps_accessible_name_and_truncation
    assert 'cn("min-w-0 truncate", labelClassName)' in '... type="button" aria-label={label} onClick={go} className={cn( ...'
test_images_header_tracks_preview_and_preserves_titlebar_controls
    assert 'labelClassName="hidden @[50rem]:inline"' in ' className="pointer-events-none relative z-40 grid h-[48px] ...'

Cause

#15520 turned the Images and Video header links into icon buttons, a deliberate redesign covered by its own media-header-links.test.ts. MediaPageLink gained an iconOnly branch ahead of the labelled one, and the Images header now renders <LibraryPageLink tab="images" iconOnly={true} /> and <SiblingMediaPageLink to="/video" /> instead of passing labelClassName / arrowClassName.

  • The first test read only the first <button in the component, which is now the icon button, so it no longer saw the labelled link it checks (whose cn("min-w-0 truncate", labelClassName) is unchanged).
  • The second test asserted the old props on the Images header. What they guaranteed, the name and arrow showing only on a wide header, now lives inside SiblingMediaPageLink (iconArrow).

The product is right; the tests pinned the old markup.

Change

  • The media link test now checks both buttons: each keeps aria-label={label}, the labelled link keeps cn("min-w-0 truncate", labelClassName) and arrowClassName, and the icon button's iconArrow label truncates and stays hidden until @[50rem], with SiblingMediaPageLink setting iconArrow={true}.
  • The Images header test asserts the two header links it now renders, in place of the removed props.

Verification (local)

  • tests/studio/test_desktop_reliability_frontend_contract.py: main 2 failed, 41 passed; this branch 43 passed.
  • Sabotage, each fails one of the two tests: making the sibling label always visible, dropping the icon button's aria-label, dropping min-w-0 from the labelled link, dropping iconArrow={true} from SiblingMediaPageLink, and removing <SiblingMediaPageLink to="/video" /> from the Images header.

Test-only change; no UI difference.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-10-27T12:45:45.413115Z 12f29ea Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 12f29eae27

ℹ️ 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".

@danielhanchen
danielhanchen merged commit c0de715 into main Oct 27, 2026
0 of 15 checks passed
@danielhanchen
danielhanchen deleted the ci-media-header-contract-icon-links branch October 27, 2026 12:51
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