Skip to content

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.

Unsloth Studio / Desktop: keep release-notes table links from splitting mid-word in the update popup (#12543)

Leo Borcherding9d904758fec3
diff --git a/studio/frontend/src/components/update/release-notes-panel.tsx b/studio/frontend/src/components/update/release-notes-panel.tsx
index 71bc1b31a84..b20a59800fe 100644
--- a/studio/frontend/src/components/update/release-notes-panel.tsx
+++ b/studio/frontend/src/components/update/release-notes-panel.tsx
@@ -144,7 +144,9 @@ export function ReleaseNotesPanel({
markdown={markdown}
// Streamdown ships headings at mt-6 and code at text-sm, and
// clears max-width on descendants, so rescale and re-cap both.
- className="max-h-none overflow-visible border-0 bg-transparent p-0 text-ui-11 [&_[data-streamdown=link-safety-modal]>*]:max-w-md [&_img]:h-auto [&_img]:max-w-full [&>*:first-child]:mt-0 [&>*>*:first-child]:mt-0 [&_code]:text-[0.92em] [&_h1]:mt-4 [&_h1]:font-heading [&_h1]:text-ui-13 [&_h2]:mt-4 [&_h2]:font-heading [&_h2]:text-ui-13 [&_h3]:mt-4 [&_h3]:font-heading [&_h3]:text-ui-11 [&_pre]:text-[0.92em]"
+ // Cells wrap at spaces: `anywhere` lets the table squeeze a
+ // column until "Download" splits mid-word.
+ className="max-h-none overflow-visible border-0 bg-transparent p-0 text-ui-11 [&_[data-streamdown=link-safety-modal]>*]:max-w-md [&_img]:h-auto [&_img]:max-w-full [&>*:first-child]:mt-0 [&>*>*:first-child]:mt-0 [&_code]:text-[0.92em] [&_h1]:mt-4 [&_h1]:font-heading [&_h1]:text-ui-13 [&_h2]:mt-4 [&_h2]:font-heading [&_h2]:text-ui-13 [&_h3]:mt-4 [&_h3]:font-heading [&_h3]:text-ui-11 [&_pre]:text-[0.92em] [&_td]:break-words [&_th]:break-words"
/>
{notes?.truncated ? (
<p className="mt-2 text-ui-10 text-muted-foreground/80">
diff --git a/tests/studio/playwright_update_banner_layout.py b/tests/studio/playwright_update_banner_layout.py
index 292a0b7cb59..8cfa67cc57f 100644
--- a/tests/studio/playwright_update_banner_layout.py
+++ b/tests/studio/playwright_update_banner_layout.py
@@ -114,6 +114,42 @@ RELEASE_NOTES = {
}
# A successful lookup with no previewable body.
RELEASE_NOTES_NONE = dict(RELEASE_NOTES, markdown = "", matched = False)
+# A Platform | Link table as release notes carry it. The cells inherited overflow-wrap:anywhere, so the table sized
+# the Link column below "Download" and split it ("Downloa / d"). The bare URL may wrap or scroll, never leave the card.
+_DL = "https://github.com/unslothai/unsloth/releases/latest/download"
+RELEASE_NOTES_TABLE = dict(
+ RELEASE_NOTES,
+ markdown = "\n".join(
+ [
+ NOTES_MARKDOWN,
+ "",
+ "## Download Unsloth Desktop",
+ "",
+ "| Platform | Link |",
+ "|---|---|",
+ f"| macOS (Apple Silicon, M1 or newer, macOS 12 and later) | [Download]({_DL}/Unsloth-Desktop-MacOS.dmg) |",
+ f"| Windows 10 / 11 (x64 installer with automatic updates) | [Download]({_DL}/Unsloth-Desktop-Windows.exe) |",
+ f"| Linux AppImage (x86_64, runs on most distributions) | [Download]({_DL}/Unsloth-Desktop-Linux.AppImage) |",
+ "",
+ "| Platform | URL |",
+ "|---|---|",
+ f"| macOS | {_DL}/Unsloth-Desktop-MacOS.dmg |",
+ ]
+ ),
+)
+TABLE_VIEWPORTS = [(1440, 900), (390, 844)]
+NOTES_TABLES = """
+() => {
+ const scroll = document.querySelector('[data-testid="update-release-notes-scroll"]');
+ const card = document.querySelector('[data-testid="web-update-banner"]');
+ if (!scroll || !card) return null;
+ const right = card.getBoundingClientRect().right;
+ return [...scroll.querySelectorAll('table')].map((table) => ({
+ links: [...table.querySelectorAll('td a')].map((a) => [a.textContent, a.getClientRects().length]),
+ pastCard: Math.max(0, table.parentElement.getBoundingClientRect().right - right),
+ }));
+}
+"""
LLAMA_STATUS = {
"supported": True,
"update_available": True,
@@ -1252,6 +1288,43 @@ def main() -> int:
measure(page, f"{width}x{height} with no preview, expanded")
context.close()
+ for width, height in TABLE_VIEWPORTS[:1] if SPOT else TABLE_VIEWPORTS:
+ size = f"{width}x{height}"
+ phase(f"release-notes tables at {size}")
+ context = browser.new_context(
+ viewport = {"width": width, "height": height},
+ reduced_motion = "reduce",
+ )
+ context.add_init_script(seed_js)
+ for pattern, payload in (
+ ("**/api/studio/update-status*", UPDATE_STATUS),
+ ("**/api/studio/release-notes*", RELEASE_NOTES_TABLE),
+ ("**/api/llama/update-status*", LLAMA_STATUS),
+ ("**/api/llama/update-changelog*", LLAMA_CHANGELOG),
+ ):
+ context.route(pattern, stub(payload))
+ page = context.new_page()
+ boot(page, "/")
+ page.locator('[data-testid="web-update-release-notes-toggle"]').click()
+ page.wait_for_selector(
+ '[data-testid="update-release-notes-scroll"] table', timeout = 10_000
+ )
+ settle_cards(page)
+ tables = page.evaluate(NOTES_TABLES) or []
+ words = tables[0]["links"] if tables else []
+ check(
+ f"{size}: every Download link in the notes table is on one line",
+ len(words) == 3 and all(text == "Download" and lines == 1 for text, lines in words),
+ f"links={words}",
+ )
+ check(
+ f"{size}: no notes table paints past the card",
+ len(tables) == 2 and all(t["pastCard"] <= 0.5 for t in tables),
+ f"tables={tables}",
+ )
+ page.screenshot(path = str(ART / f"{size}-notes-tables.png"))
+ context.close()
+
# The loaded models indicator, switched on. It is the last child of the
# rail, so it lands on the corner, and its arrival used to re-measure
# the rail and move the whole stack. That is the case to check.