commit 28018de287518d49f453ab47048cf7a84d926621
parent 1e928a6e48cef0c9652dc80e477f9a72e170fc06
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sun, 20 Sep 2026 18:36:20 -0400
channels: one spelling of "internal" and of the location param
The free-up rule and the volume chips were each carrying their own literal for
a string /storage writes into a link. Both now import the constant from
views/storage — a VALUE import from views/, which is client-safe because every
import in that module is a type import; next build is what proves it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/editor/app/channels/components/ChannelVolumeBar.tsx b/editor/app/channels/components/ChannelVolumeBar.tsx
@@ -4,6 +4,10 @@ import Link from "next/link";
import { useState } from "react";
import { usePathname, useSearchParams } from "next/navigation";
import { formatBytes } from "yt-dlp-transcript-common/lib/format";
+// One spelling of the param, shared with the /storage row that writes the link.
+// A value import from views/, which is client-safe: every import in that module
+// is a type import.
+import { LOCATION_FILTER_PARAM } from "yt-dlp-transcript-common/views/storage";
// THE VOLUME BRIDGE — how much room each disk has, said ONCE, and the filter.
//
@@ -62,8 +66,8 @@ export function ChannelVolumeBar({
// dropped ?site= would answer one by discarding the other.
const href = (id: string | null): string => {
const next = new URLSearchParams(params.toString());
- if (id === null) next.delete("location");
- else next.set("location", id);
+ if (id === null) next.delete(LOCATION_FILTER_PARAM);
+ else next.set(LOCATION_FILTER_PARAM, id);
// A new filter is a new list; the sort /storage asked for belongs to the
// link that carried it.
next.delete("sort");
diff --git a/editor/app/channels/components/ChannelsTable.tsx b/editor/app/channels/components/ChannelsTable.tsx
@@ -27,6 +27,11 @@ import {
import { ChannelVolumeBar, type ChannelVolume } from "./ChannelVolumeBar";
import { formatBytes } from "yt-dlp-transcript-common/lib/format";
import { selectToFreeBytes } from "yt-dlp-transcript-common/views/freeUpSelection";
+// A VALUE import from views/, and it is safe: every import in that module is a
+// type import, so what reaches the client bundle is two string constants. The
+// point is that "internal" and "location" have ONE spelling across /storage
+// (which writes the link) and /channels (which reads it).
+import { INTERNAL_ROW_ID } from "yt-dlp-transcript-common/views/storage";
import {
tierOrder,
type PriorityOperation,
@@ -351,7 +356,7 @@ export function ChannelsTable({
channels.map((c) => ({
slug: c.slug,
bytes: c.mediaBytes,
- inPlace: c.volumeId === "internal",
+ inPlace: c.volumeId === INTERNAL_ROW_ID,
})),
targetGB * 1024 ** 3,
);