🚨 fix: clear the fork's knip and lint debt that fails Fork CI - #17
Merged
Merged
Conversation
Knip's export check failed Fork CI on thirteen fork-only exports that nothing imports. Each stays in use inside its file, so only the export keyword goes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…w it renders vp check failed Fork CI on arbitrary values and restyled ui components in the background studio, the usage sidebar, the thread inset and the changed files header. Each class now resolves to the same CSS through theme tokens (declared in custom.css), wrapper elements or the component's own defaults. The hover-revealed delete button is left as it was. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…Button The delete buttons restyled Button with opacity and transition classes, which the shadcn lint rejects. The fade now lives on a wrapping span, as upstream does, and the Button is bare. Its press and focus ring animate like every other Button again, since transition-opacity no longer replaces Button's own transition. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork CI's
Checkjob fails on the fork's own code:vp run knip:checkfinds 13 unused exports in fork-only files, andvp checkfinds 44 shadcn lint errors (no-arbitrary-values,no-restyle,require-static-classes) in the background studio, the usage sidebar, and two fork-changed lines in upstream files. Upstream's Check passes on the same nightly.This PR clears all of them. Every lint fix but one renders and behaves exactly as before. The exception, which the owner approved, is the hover-revealed delete button: it now animates its press and focus ring like every other Button (see Delete button).
Knip
fnKeySetupFromState,SERVE_MODE_REQUEST_DIR,keepAwakeCommand,CUSTOM_BACKGROUND_IMAGE_MAX_DIMENSION,CUSTOM_BACKGROUND_IMAGE_MAX_BYTES,readBackgroundImage,DYNAMIC_THEME_ID,IMAGE_DITHERING_FILTER,DEFAULT_CUSTOM_BACKGROUND_FILTER,MIN_/MAX_CUSTOM_BACKGROUND_ROTATION_MINUTES,VOICE_TRANSCRIPTION_MAX_BYTESandpictureLoudnessare all still used inside their own file, and no test imports them. Each one only loses itsexportkeyword.Lint
New theme tokens go in the fork-owned
custom.css, in an@theme inlineblock. This follows upstream's pattern of naming tokens after a feature, like--shadow-composer:--text-studio0.8125rem(13px). It has no--line-heightcompanion, so Tailwind emits onlyfont-size, the same astext-[13px]--radius-studio-field-innercalc(var(--radius-lg) - 1px)--shadow-studio-field/-dark0 1px --theme(--color-black/4%)/0 -1px --theme(--color-white/6%)--color-glasscolor-mix(in srgb, var(--glass-fill, var(--glass-surface)) var(--glass-opacity), transparent)studiois registered with tailwind-merge inlib/utils.tsnext to2xs–5xs. Without that,cn()would readtext-studioas a colour and drop it next totext-muted-foreground.text-2xsandtext-3xsset a line height, buttext-[11px]andtext-[10px]do not; they inherit it. So each swap also adds theleading-*that matches what that element used to inherit. Otherwise the swap alone would move text by about a pixel.before:rounded-[calc(var(--radius-lg)-1px)]before:rounded-studio-field-innerborder-radius: calc(var(--radius-lg) - 1px)…before:shadow-[0_1px_--theme(--color-black/4%)],dark:…before:shadow-[0_-1px_--theme(--color-white/6%)]…before:shadow-studio-field,dark:…before:shadow-studio-field-dark--tw-shadowdeclarations, including the@supportscolor-mix branchhas-focus-visible:ring-[3px],focus-visible:ring-[3px]…:ring-3--tw-ring-shadow(3px)text-[11px]text-2xs leading-(--text-xs--line-height)text-xsratio that the span used to inherittext-[10px]text-3xs leading-normalhtmlthrough the portaled menutext-[11px]text-2xs leading-normal<Input unstyled className={backgroundStudioFieldClass(…)}>(dynamic className on a ui component)<span>.<Input unstyled className="flex min-w-0 flex-1 self-stretch">h-fullthrough the same descendant selector, so the size, focus ring (:has(:focus-visible)) and bevel are unchanged. One detail differs: the input'srounded-[inherit]now inherits 0 instead of 10px. It has no background, border or outline, so the radius isn't visibletext-[13px]text-studiofont-sizeonly, 13pxtext-[11px]text-2xs leading-normaltext-[11px]text-2xs leading-tightleading-tight, so it inherited 1.25<Label className="truncate text-[13px] … @sm/studio:pt-1">LabelElement,text-studioLabel. It is a local"span" | "label"whose name the rule mistook for the ui component. Same element, same classes<SidebarContent className="gap-0">gap: normalis 0 in flex<SidebarGroup className="relative z-[1] p-[var(--sidebar-content-inset)] pt-1"><SidebarGroup className="z-[1]">with-mt-1on its only childrelativeand the padding repeat SidebarGroup's own classes.pt-2with a-mt-1child puts the child at y=4 and keeps the group 4px + content + 8px tall, the same aspt-1. Nothing overflows the group. This matches upstream Sidebar's<SidebarGroup className="z-[1]">header<SidebarGroup className="pt-0"><SidebarGroup>fixedHeader, SidebarContent already sets[&>[data-sidebar=group]:first-child]:pt-0, which is more specificgap-4on SidebarGroupflex min-w-0 flex-col gap-4div inside ittext-[11px]text-2xs leading-normalhtml<SidebarInset className="… bg-transparent text-foreground …">data-thread-route-inset="", andcustom.csssetsbackground-color: transparent; color: var(--contrast-foreground)text-foregroundcompiles tovar(--contrast-foreground). The unlayered rule beats SidebarInset'sbg-background, just as the utility did once tailwind-merge dropped it. I checked that no other unlayered rule hits this element except the no-projects:has()rule, which is more specific either way. This follows custom.css's own "change upstream styling from here" conventionbg-[color-mix(in_srgb,var(--glass-fill,var(--glass-surface))_var(--glass-opacity),transparent)]bg-glassbackground-color, including its@supportsfallback. The t3-chat light-theme override in custom.css still wins as beforeI compared every old/new pair above by compiling it with the app's own
index.css(Tailwind 4.3.3, the@tailwindcss/nodecompileAPI) and diffing the emitted CSS. For the layout changes (wrappers,-mt-1, the droppedgap-0/pt-0), I read through SidebarContent/SidebarGroup/Input source to show they are equivalent. I did not take before/after screenshots. The repo's AGENTS.md tells subagents not to start dev servers or browsers without permission, and nothing here is meant to change pixels.One caveat that applies to the 11px→
2xs, 10px→3xsand 13px→studioswaps alike: rem tokens equal the old px values only at the default 16px root font size. The app never changes that size, but a browser with a non-default base font size would scale these texts like the rest of the UI.Delete button
The image picker's and the library's hover-revealed delete
Buttonhadbg-popover opacity-0 transition-opacity group-*/focus-visible/pointer-coarse:opacity-100in its className (6 ×no-restyle, 1 ×require-static-classes).<Button className="absolute right-1 top-1 bg-popover opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100"><span className="absolute right-1 top-1 flex opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 has-focus-visible:opacity-100 pointer-coarse:opacity-100">around a bare<Button>, as in upstream's KeybindingsSettings and PullRequestEditButtonbg-popoveralready comes from the fork'soutlinevariant. Motion change (approved by the owner): tailwind-merge used to lettransition-opacityreplace Button's owntransition-[box-shadow,scale], so the press (scale 0.97) and the focus ring snapped instantly. Now they animate over 150ms like every other ButtonVerification
vp run knip:check: cleanvp check: 0 errors, 783 warnings (unchanged). It was 44 errors beforevpr typecheck: passesMade by Claude Opus 5.5 (1M context) in Claude Code, as a subagent.
🤖 Generated with Claude Code