Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Tests: follow the media header's MediaHeaderActions row from #15919 (#15946)
Daniel Han9bc89f8ee1ce
diff --git a/tests/studio/test_desktop_reliability_frontend_contract.py b/tests/studio/test_desktop_reliability_frontend_contract.pyindex 2a9853f1818..e4d10cd62dd 100644--- a/tests/studio/test_desktop_reliability_frontend_contract.py+++ b/tests/studio/test_desktop_reliability_frontend_contract.py@@ -1023,6 +1023,32 @@ RAIL_WIDTH_SCALED = ("@[50rem]:w-[min(var(--media-rail-width,calc(408px*var(--ui-space-scale,1))),calc(100%-13rem))]")HEADER_COLUMNS = "grid-cols-[minmax(0,var(--media-rail-width,408px))_minmax(13rem,1fr)]"+MEDIA_HEADER_ACTIONS = FRONTEND / "components/media-header-actions.tsx"+# Since #15919 the preview column is pill | links, the links' column never narrower than the links.+MEDIA_HEADER_ROW = "grid h-full min-w-0 grid-cols-[minmax(0,1fr)_auto_minmax(max-content,1fr)]"+++def _media_header_actions(header: str) -> str:+ """The children a page hands MediaHeaderActions, which places them in the row's third column."""+ opened = header.split("<MediaHeaderActions", 1)+ assert (+ len(opened) == 2+ ), "the media header no longer renders its links through MediaHeaderActions"+ children = opened[1].split("</MediaHeaderActions>", 1)+ assert len(children) == 2, "MediaHeaderActions is no longer closed inside the header"+ return children[0]+++def _assert_media_header_row(header: str) -> str:+ """Create / Train centred in column 2, the links in column 3; returns the links."""+ assert MEDIA_HEADER_ROW in header+ assert "data-media-header-centre" in header+ assert "pointer-events-auto col-start-2 justify-self-center pt-" in header+ actions = _ui_source(MEDIA_HEADER_ACTIONS)+ # The slot is click-through like the band; only the links' own group takes clicks.+ assert "pointer-events-none col-start-3 row-start-1" in actions+ assert '"pointer-events-auto flex shrink-0 items-center' in actions+ return _media_header_actions(header)def _ui_source(path) -> str:@@ -2007,11 +2033,8 @@ def test_audio_page_matches_the_image_rail_header_and_action_footer():assert _MEDIA_PICKER_CLASS in header# No label override: the trigger reads exactly like Chat's.assert "triggerLabelClassName" not in header- assert "grid h-full min-w-0 grid-cols-[1fr_auto_auto] gap-2" in header- assert "@[50rem]:grid-cols-[1fr_auto_1fr]" in header- assert "col-start-2 justify-self-end pt-" in header- assert "@[50rem]:justify-self-center" in header- assert "col-start-3" in header and "<LibraryPageLink" in header+ links = _assert_media_header_row(header)+ assert "<LibraryPageLink" in linksassert "absolute" not in header.split("<PillTabs", 1)[0]assert "@[50rem]:flex-row @[50rem]:overflow-hidden" in layout@@ -2141,6 +2164,11 @@ def test_media_page_headers_out_stack_the_mac_drag_region():band = band.split(band_end, 1)[0]groups = re.findall(r'"([^"]*pointer-events-auto[^"]*)"', band)+ if "<MediaHeaderActions" in band:+ # The links' clickable group is drawn by the component, inside its click-through slot.+ groups += re.findall(+ r'"([^"]*pointer-events-auto[^"]*)"', _ui_source(MEDIA_HEADER_ACTIONS)+ )assert len(groups) >= min_groups, (page.name, groups)@@ -2163,14 +2191,11 @@ def test_images_header_tracks_preview_and_preserves_titlebar_controls():assert _MEDIA_PICKER_CLASS in header# No label override: the trigger reads exactly like Chat's.assert "triggerLabelClassName" not in header- assert "grid h-full min-w-0 grid-cols-[1fr_auto_auto] gap-2" in header- assert "@[50rem]:grid-cols-[1fr_auto_1fr] @[50rem]:gap-0" in header- assert "col-start-2" in header- assert "col-start-3" in header+ links = _assert_media_header_row(header)# Header icon buttons since #15520; the sibling link hides its name on a narrow header# itself (checked in test_compact_media_link_keeps_accessible_name_and_truncation).- assert '<LibraryPageLink tab="images" iconOnly={true} />' in header- assert '<SiblingMediaPageLink to="/video" />' in header+ assert '<LibraryPageLink tab="images" iconOnly={true} />' in links+ assert '<SiblingMediaPageLink to="/video" />' in linksassert "absolute" not in header.split("<PillTabs", 1)[0]