-
Notifications
You must be signed in to change notification settings - Fork 0
feat(studio): add version footer showing unsloth version and beta badge #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
16d41c3
ca778a8
b189ef6
c295aa7
fe5afe7
abe5b1f
4ffe837
85f02c9
c4887a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // SPDX-License-Identifier: AGPL-3.0-only | ||
| // Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 | ||
|
|
||
| import { useEffect, useState } from "react"; | ||
| import { cn } from "@/lib/utils"; | ||
|
|
||
| interface HardwareInfo { | ||
| gpu: { | ||
| gpu_name: string | null; | ||
| vram_total_gb: number | null; | ||
| vram_free_gb: number | null; | ||
| }; | ||
| versions: { | ||
| unsloth: string | null; | ||
| torch: string | null; | ||
| transformers: string | null; | ||
| cuda: string | null; | ||
| }; | ||
| } | ||
|
|
||
| export function VersionFooter({ className }: { className?: string }) { | ||
| const [version, setVersion] = useState<string | null>(null); | ||
|
|
||
| useEffect(() => { | ||
| fetch("/api/system/hardware") | ||
| .then((response) => { | ||
| if (!response.ok) throw new Error("Failed to fetch"); | ||
| return response.json(); | ||
| }) | ||
| .then((data: HardwareInfo) => setVersion(data.versions.unsloth)) | ||
| .catch(() => {}); | ||
| }, []); | ||
|
Comment on lines
+4
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic for fetching hardware information and the |
||
|
|
||
| if (!version) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <footer | ||
| className={cn( | ||
| "fixed bottom-0 left-0 right-0 z-10 flex items-center justify-center gap-1.5 py-2 text-sm text-muted-foreground", | ||
| className | ||
| )} | ||
| > | ||
| <span className="font-mono">v{version}</span> | ||
| <span className="font-extrabold tracking-[0.12em] text-primary"> | ||
| BETA | ||
| </span> | ||
| </footer> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -824,7 +824,7 @@ export function ChatPage(): ReactElement { | |
| }, [modelSelectorLocked, tour.open]); | ||
|
|
||
| return ( | ||
| <div className="h-[calc(100dvh-4rem)] bg-background overflow-hidden"> | ||
| <div className="h-[calc(100dvh-6rem)] bg-background overflow-hidden"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reducing the height of the container to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The chat container now always subtracts an extra Useful? React with 👍 / 👎. |
||
| <GuidedTour {...tour.tourProps} /> | ||
| <SidebarProvider | ||
| defaultOpen={true} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rendering
VersionFooterat the root adds a fixed overlay to every page, but onlyChatPagewas updated to make room for it. Other routed screens (for exampleStudioPage/ExportPage) still use full-height layouts without bottom padding, so their last interactive content can be covered by the footer and become hard to read/click when scrolled to the end. Please add a shared bottom inset for routed content (or scope the footer to pages that already reserve space).Useful? React with 👍 / 👎.