authorgravatar for me@t3.ggTheo Browne <me@t3.gg> 2026-08-04 21:31:39-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-04 21:31:39-07:00
log41ebf22eea64e177b11a0709a16d6716581cc78c
tree7bce7f4433e41148fa1366c975ee9d05ec88696f
parent3d429662c9bd7b731c059dc3a84ccdfc43bf3701
signature Signed by PGP key B5690EEEBB952194

fix(web): clear main branch lint warnings (#5384)


6 files changed, 30 insertions(+), 20 deletions(-)

apps/web/src/components/ChatMarkdown.tsx+4
......@@ -1363,6 +1363,9 @@ function ChatMarkdown({
13631363 },
13641364 [createAssetUrl, openPreview, preparedConnection, threadRef],
13651365 );
1366 /* eslint-disable react/no-unstable-nested-components -- ReactMarkdown requires component
1367 * renderers that close over this message's metadata. useMemo keeps them stable until that
1368 * metadata changes. */
13661369 const markdownComponents = useMemo<Components>(() => {
13671370 const fileLinkChip = (
13681371 fileLinkMeta: MarkdownFileLinkMeta,
......@@ -1593,6 +1596,7 @@ function ChatMarkdown({
15931596 text,
15941597 threadRef,
15951598 ]);
1599 /* eslint-enable react/no-unstable-nested-components */
15961600
15971601 return (
15981602 <div
apps/web/src/components/CommandPalette.tsx+13-14
......@@ -138,9 +138,20 @@ import {
138138 buildSidebarProjectPickerEntries,
139139 buildSidebarProjectSnapshots,
140140} from "../sidebarProjectGrouping";
141import type { Project } from "../types";
141142
142143const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = [];
143144
145function projectFavicon(project: Project) {
146 return (
147 <ProjectFavicon
148 environmentId={project.environmentId}
149 cwd={project.workspaceRoot}
150 className={ITEM_ICON_CLASS}
151 />
152 );
153}
154
144155function getLocalFileManagerName(platform: string): string {
145156 if (isMacPlatform(platform)) {
146157 return "Finder";
......@@ -924,13 +935,7 @@ function OpenCommandPaletteDialog(props: {
924935 group?.memberProjects.flatMap((member) => [member.title, member.workspaceRoot]) ?? []
925936 );
926937 },
927 icon: (project) => (
928 <ProjectFavicon
929 environmentId={project.environmentId}
930 cwd={project.workspaceRoot}
931 className={ITEM_ICON_CLASS}
932 />
933 ),
938 icon: projectFavicon,
934939 runProject: openProjectFromSearch,
935940 }),
936941 [openProjectFromSearch, pickerProjects, projectGroupByTargetKey],
......@@ -948,13 +953,7 @@ function OpenCommandPaletteDialog(props: {
948953 group?.memberProjects.flatMap((member) => [member.title, member.workspaceRoot]) ?? []
949954 );
950955 },
951 icon: (project) => (
952 <ProjectFavicon
953 environmentId={project.environmentId}
954 cwd={project.workspaceRoot}
955 className={ITEM_ICON_CLASS}
956 />
957 ),
956 icon: projectFavicon,
958957 runProject: async (project) => {
959958 const group = projectGroupByTargetKey.get(`${project.environmentId}:${project.id}`);
960959 const contextualRefBelongsToGroup =
apps/web/src/components/settings/FontFamilyPicker.tsx-1
......@@ -129,7 +129,6 @@ export function FontFamilyPicker({
129129 if (initialOpen) setOpen(true);
130130 // The prop is only meaningful at mount - the control just swapped in
131131 // under an active focus - so later changes are deliberately ignored.
132 // eslint-disable-next-line react-hooks/exhaustive-deps
133132 }, []);
134133 const listRef = useRef<LegendListRef | null>(null);
135134 const enumeration = useFontEnumeration();
apps/web/src/components/settings/SettingsFontPreviews.tsx+2-2
......@@ -113,8 +113,8 @@ export function CodeFontPreview() {
113113 if (htmlByFile === null) return null;
114114 return (
115115 <div className="mt-1 mb-2 space-y-2">
116 {htmlByFile.map((html, index) => (
117 <StaticDiffHtml key={index} html={html} />
116 {htmlByFile.map((html) => (
117 <StaticDiffHtml key={html} html={html} />
118118 ))}
119119 </div>
120120 );
apps/web/src/components/settings/SettingsPanels.tsx-1
......@@ -116,7 +116,6 @@ import {
116116 isMonospaceFamily,
117117 resolveDefaultFamilyLabel,
118118} from "../../appearanceFonts";
119import { DEFAULT_TERMINAL_FONT_FAMILY } from "~/terminal/ghostty/surface";
120119import { CodeFontPreview, PromptFontPreview, TerminalFontPreview } from "./SettingsFontPreviews";
121120import { discoverInstalledFonts, FontFamilyPicker, useFontEnumeration } from "./FontFamilyPicker";
122121import {
apps/web/src/components/sidebar/SidebarUpdatePill.tsx+11-2
......@@ -19,6 +19,15 @@ import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
1919import { Separator } from "../ui/separator";
2020import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
2121
22function keyReleaseNoteItems(items: ReadonlyArray<string>) {
23 const occurrences = new Map<string, number>();
24 return items.map((item) => {
25 const occurrence = occurrences.get(item) ?? 0;
26 occurrences.set(item, occurrence + 1);
27 return { item, key: JSON.stringify([item, occurrence]) };
28 });
29}
30
2231function SidebarUpdateReleaseNotesTooltip({
2332 state,
2433 tooltip,
......@@ -44,8 +53,8 @@ function SidebarUpdateReleaseNotesTooltip({
4453 {index === 0 ? "What's changed" : `Changes in ${releaseNote.version}`}
4554 </h3>
4655 <ul className="mt-2 space-y-1.5 pl-4 text-xs leading-5 text-popover-foreground/90">
47 {releaseNote.items.map((item, itemIndex) => (
48 <li className="list-disc break-words" key={`${releaseNote.version}-${itemIndex}`}>
56 {keyReleaseNoteItems(releaseNote.items).map(({ item, key }) => (
57 <li className="list-disc break-words" key={key}>
4958 {item}
5059 </li>
5160 ))}