| author | |
| committer | |
| log | 1200f530bdc8be25ca1c85affa42b6d9c259601c |
| tree | 738528b79a38ede7314410aab0973da8370695b3 |
| parent | 226abe5f916ff828d8be2c19f1148b10feebfe43 |
| signature | Signed by PGP key B5690EEEBB952194 |
22 files changed, 27 insertions(+), 52 deletions(-)
apps/web/src/browser/browserViewportActions.ts+1-1| ... | ... | @@ -4,7 +4,7 @@ type BrowserViewportHandler = (setting: PreviewViewportSetting) => Promise<void> |
| 4 | 4 | |
| 5 | 5 | export const BROWSER_VIEWPORT_COMMIT_TIMEOUT_MS = 15_000; |
| 6 | 6 | |
| 7 | export class BrowserViewportCommitTimeoutError extends Error { | |
| 7 | class BrowserViewportCommitTimeoutError extends Error { | |
| 8 | 8 | override readonly name = "BrowserViewportCommitTimeoutError"; |
| 9 | 9 | |
| 10 | 10 | constructor(readonly tabId: string) { |
apps/web/src/browser/webviewCrashRecovery.ts+2-2| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | export const WEBVIEW_CRASH_RECOVERY_WINDOW_MS = 30_000; |
| 2 | export const WEBVIEW_CRASH_RECOVERY_MAX_ATTEMPTS = 3; | |
| 3 | export const WEBVIEW_CRASH_RECOVERY_BASE_DELAY_MS = 250; | |
| 2 | const WEBVIEW_CRASH_RECOVERY_MAX_ATTEMPTS = 3; | |
| 3 | const WEBVIEW_CRASH_RECOVERY_BASE_DELAY_MS = 250; | |
| 4 | 4 | |
| 5 | 5 | export interface WebviewCrashRecoveryState { |
| 6 | 6 | readonly attempts: number; |
apps/web/src/browserFaviconLogic.ts+1-1| ... | ... | @@ -9,7 +9,7 @@ export type BrowserFaviconEntry = { |
| 9 | 9 | }; |
| 10 | 10 | |
| 11 | 11 | export const BROWSER_FAVICON_MAX_ENTRIES = 40; |
| 12 | export const BROWSER_FAVICON_MAX_KEY_LENGTH = 4_096; | |
| 12 | const BROWSER_FAVICON_MAX_KEY_LENGTH = 4_096; | |
| 13 | 13 | const BROWSER_FAVICON_MAX_FUTURE_SKEW_MS = 5 * 60 * 1_000; |
| 14 | 14 | export const BROWSER_FAVICON_MAX_ALIASES_PER_ENTRY = 4; |
| 15 | 15 | const BROWSER_FAVICON_MAX_ALIAS_LENGTH = 255; |
apps/web/src/browserHistoryStore.ts+2-2| ... | ... | @@ -14,7 +14,7 @@ export type BrowserHistoryEntry = { url: string; lastVisitedAt: number; title?: |
| 14 | 14 | |
| 15 | 15 | export const BROWSER_HISTORY_MAX_ENTRIES_PER_PROJECT = 50; |
| 16 | 16 | export const BROWSER_HISTORY_MAX_PROJECTS = 20; |
| 17 | export const BROWSER_HISTORY_MAX_URL_LENGTH = 2048; | |
| 17 | const BROWSER_HISTORY_MAX_URL_LENGTH = 2048; | |
| 18 | 18 | export const BROWSER_HISTORY_MAX_TITLE_LENGTH = 512; |
| 19 | 19 | const MAX_VALID_DATE_MS = 8_640_000_000_000_000; |
| 20 | 20 | |
| ... | ... | @@ -35,7 +35,7 @@ export function normalizeHistoryUrl(raw: string): string | null { |
| 35 | 35 | return parsed.href.length > BROWSER_HISTORY_MAX_URL_LENGTH ? null : parsed.href; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | export function titleLookupKey(normalized: string, environmentHostname?: string | null): string { | |
| 38 | function titleLookupKey(normalized: string, environmentHostname?: string | null): string { | |
| 39 | 39 | const parsed = new URL(visitLookupKey(normalized, environmentHostname)); |
| 40 | 40 | if (parsed.pathname !== "/" && parsed.pathname.endsWith("/")) |
| 41 | 41 | parsed.pathname = parsed.pathname.slice(0, -1); |
apps/web/src/clientPersistenceStorage.ts+1-1| ... | ... | @@ -2,7 +2,7 @@ import { ClientSettingsSchema, type ClientSettings } from "@t3tools/contracts"; |
| 2 | 2 | |
| 3 | 3 | import { getLocalStorageItem, setLocalStorageItem } from "./hooks/useLocalStorage"; |
| 4 | 4 | |
| 5 | export const CLIENT_SETTINGS_STORAGE_KEY = "t3code:client-settings:v1"; | |
| 5 | const CLIENT_SETTINGS_STORAGE_KEY = "t3code:client-settings:v1"; | |
| 6 | 6 | |
| 7 | 7 | function hasWindow(): boolean { |
| 8 | 8 | return typeof window !== "undefined"; |
apps/web/src/composerDraftStore.ts+2-4| ... | ... | @@ -769,7 +769,7 @@ const EMPTY_THREAD_DRAFT = Object.freeze<ComposerThreadDraftState>({ |
| 769 | 769 | * slice — adding a new field to the interface (e.g. `elementContexts`) only |
| 770 | 770 | * has to be reflected here, not in every stub. |
| 771 | 771 | */ |
| 772 | export function createEmptyThreadDraft(): ComposerThreadDraftState { | |
| 772 | function createEmptyThreadDraft(): ComposerThreadDraftState { | |
| 773 | 773 | return { |
| 774 | 774 | prompt: "", |
| 775 | 775 | images: [], |
| ... | ... | @@ -4050,9 +4050,7 @@ export function useThreadHasUnsentDraft(threadRef: ScopedThreadRef): boolean { |
| 4050 | 4050 | ); |
| 4051 | 4051 | } |
| 4052 | 4052 | |
| 4053 | export function useComposerDraftModelState( | |
| 4054 | threadRef: ComposerThreadTarget, | |
| 4055 | ): ComposerDraftModelState { | |
| 4053 | function useComposerDraftModelState(threadRef: ComposerThreadTarget): ComposerDraftModelState { | |
| 4056 | 4054 | return useComposerDraftStore( |
| 4057 | 4055 | useShallow((state) => { |
| 4058 | 4056 | const draft = getComposerDraftState(state, threadRef); |
apps/web/src/desktopAppActivation.ts+1-1| ... | ... | @@ -44,7 +44,7 @@ function failure( |
| 44 | 44 | return { version: 1, requestId, ok: false, code, message }; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | export function desktopPlatformToEnvironmentOs( | |
| 47 | function desktopPlatformToEnvironmentOs( | |
| 48 | 48 | platform: DesktopAppActivationRequest["platform"], |
| 49 | 49 | ): ExecutionEnvironmentPlatformOs { |
| 50 | 50 | return platform === "win32" ? "windows" : platform; |
apps/web/src/keybindings.ts-8| ... | ... | @@ -377,14 +377,6 @@ export function isDiffToggleShortcut( |
| 377 | 377 | return matchesCommandShortcut(event, keybindings, "diff.toggle", options); |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | export function isPreviewRefreshShortcut( | |
| 381 | event: ShortcutEventLike, | |
| 382 | keybindings: ResolvedKeybindingsConfig, | |
| 383 | options?: ShortcutMatchOptions, | |
| 384 | ): boolean { | |
| 385 | return matchesCommandShortcut(event, keybindings, "preview.refresh", options); | |
| 386 | } | |
| 387 | ||
| 388 | 380 | export function isOpenFavoriteEditorShortcut( |
| 389 | 381 | event: ShortcutEventLike, |
| 390 | 382 | keybindings: ResolvedKeybindingsConfig, |
apps/web/src/lib/attachmentUploadQueue.ts+1-1| ... | ... | @@ -445,7 +445,7 @@ export function startAttachmentUpload(input: { |
| 445 | 445 | * persisted draft upload survives cancellation (an environment switch cancels |
| 446 | 446 | * the old job, and the draft still references that server copy). |
| 447 | 447 | */ |
| 448 | export function cancelAttachmentUpload(imageId: string): void { | |
| 448 | function cancelAttachmentUpload(imageId: string): void { | |
| 449 | 449 | const job = jobsByImageId.get(imageId); |
| 450 | 450 | if (!job) { |
| 451 | 451 | return; |
apps/web/src/lib/diffRendering.ts+2-2| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | import { parsePatchFiles } from "@pierre/diffs/utils/parsePatchFiles"; |
| 2 | 2 | import type { FileDiffMetadata } from "@pierre/diffs/types"; |
| 3 | 3 | |
| 4 | export const DIFF_THEME_NAMES = { | |
| 4 | const DIFF_THEME_NAMES = { | |
| 5 | 5 | light: "pierre-light", |
| 6 | 6 | dark: "pierre-dark", |
| 7 | 7 | } as const; |
| ... | ... | @@ -81,7 +81,7 @@ interface RenderablePatchOptions { |
| 81 | 81 | compactPartialHunkOffsets?: boolean; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | export function compactPartialHunkOffsets(file: FileDiffMetadata): FileDiffMetadata { | |
| 84 | function compactPartialHunkOffsets(file: FileDiffMetadata): FileDiffMetadata { | |
| 85 | 85 | if (!file.isPartial) return file; |
| 86 | 86 | |
| 87 | 87 | let splitLineStart = 0; |
apps/web/src/lib/previewAnnotation.ts+1-1| ... | ... | @@ -111,7 +111,7 @@ async function previewAnnotationScreenshotFile( |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** Upper bound on turning a picked element's crop into a composer attachment. */ |
| 114 | export const PREVIEW_ANNOTATION_CAPTURE_TIMEOUT_MS = 5_000; | |
| 114 | const PREVIEW_ANNOTATION_CAPTURE_TIMEOUT_MS = 5_000; | |
| 115 | 115 | |
| 116 | 116 | export type PreviewAnnotationCapture = |
| 117 | 117 | /** The crop is ready to attach. */ |
apps/web/src/lib/storage.ts+1-1| ... | ... | @@ -26,7 +26,7 @@ export function createMemoryStorage(): StateStorage { |
| 26 | 26 | }; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | export function isStateStorage( | |
| 29 | function isStateStorage( | |
| 30 | 30 | storage: Partial<StateStorage> | null | undefined, |
| 31 | 31 | ): storage is StateStorage { |
| 32 | 32 | return ( |
apps/web/src/lib/terminalContext.ts+2-5| ... | ... | @@ -65,7 +65,7 @@ export function filterTerminalContextsWithText<T extends { text: string }>( |
| 65 | 65 | return contexts.filter((context) => hasTerminalContextText(context)); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | export function normalizeTerminalContextSelection( | |
| 68 | function normalizeTerminalContextSelection( | |
| 69 | 69 | selection: TerminalContextSelection, |
| 70 | 70 | ): TerminalContextSelection | null { |
| 71 | 71 | const text = normalizeTerminalContextText(selection.text); |
| ... | ... | @@ -85,10 +85,7 @@ export function normalizeTerminalContextSelection( |
| 85 | 85 | }; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | export function formatTerminalContextRange(selection: { | |
| 89 | lineStart: number; | |
| 90 | lineEnd: number; | |
| 91 | }): string { | |
| 88 | function formatTerminalContextRange(selection: { lineStart: number; lineEnd: number }): string { | |
| 92 | 89 | return selection.lineStart === selection.lineEnd |
| 93 | 90 | ? `line ${selection.lineStart}` |
| 94 | 91 | : `lines ${selection.lineStart}-${selection.lineEnd}`; |
apps/web/src/lib/windowControlsOverlay.ts+1-1| ... | ... | @@ -43,7 +43,7 @@ export function syncDocumentWindowControlsOverlayClass(): () => void { |
| 43 | 43 | }; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | export function getElectronPlatformClassNames( | |
| 46 | function getElectronPlatformClassNames( | |
| 47 | 47 | platform: string, |
| 48 | 48 | ): |
| 49 | 49 | | readonly [typeof ELECTRON_CLASS_NAME] |
apps/web/src/logicalProject.ts-1| ... | ... | @@ -4,7 +4,6 @@ export { |
| 4 | 4 | deriveLogicalProjectKeyFromSettings, |
| 5 | 5 | derivePhysicalProjectKey, |
| 6 | 6 | derivePhysicalProjectKeyFromPath, |
| 7 | deriveProjectGroupLabel, | |
| 8 | 7 | deriveProjectGroupingOverrideKey, |
| 9 | 8 | getProjectOrderKey, |
| 10 | 9 | resolveProjectGroupingMode, |
apps/web/src/portDiscoveryState.ts+1-1| ... | ... | @@ -43,7 +43,7 @@ export function boundConfiguredLocalServerUrls( |
| 43 | 43 | return bounded; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | export function useDiscoveredPorts( | |
| 46 | function useDiscoveredPorts( | |
| 47 | 47 | environmentId: EnvironmentId | null, |
| 48 | 48 | configuredUrls?: ReadonlyArray<string>, |
| 49 | 49 | ): ReadonlyArray<DiscoveredLocalServer> { |
apps/web/src/projectIconOptions.ts+1-1| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | import { iconNames, type IconName } from "lucide-react/dynamic"; |
| 2 | 2 | export { PROJECT_ICON_COLORS, projectIconColorClassName } from "./projectIconColors"; |
| 3 | 3 | |
| 4 | export const POPULAR_PROJECT_ICONS = [ | |
| 4 | const POPULAR_PROJECT_ICONS = [ | |
| 5 | 5 | "folder-code", |
| 6 | 6 | "code-2", |
| 7 | 7 | "terminal", |
apps/web/src/reviewCommentContext.ts-6| ... | ... | @@ -180,12 +180,6 @@ export function parseReviewCommentMessageSegments( |
| 180 | 180 | return segments; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | export function hasReviewCommentMessageSegments(value: string): boolean { | |
| 184 | return parseReviewCommentMessageSegments(value).some( | |
| 185 | (segment) => segment.kind === "review-comment", | |
| 186 | ); | |
| 187 | } | |
| 188 | ||
| 189 | 183 | export function formatReviewCommentFence(language: string, contents: string): string { |
| 190 | 184 | const longestBacktickRun = Math.max( |
| 191 | 185 | 0, |
apps/web/src/rightPanelStore.ts+2-2| ... | ... | @@ -14,7 +14,7 @@ import { createJSONStorage, persist } from "zustand/middleware"; |
| 14 | 14 | |
| 15 | 15 | import { resolveStorage } from "./lib/storage"; |
| 16 | 16 | |
| 17 | export const RIGHT_PANEL_KINDS = [ | |
| 17 | const RIGHT_PANEL_KINDS = [ | |
| 18 | 18 | "diff", |
| 19 | 19 | "files", |
| 20 | 20 | "file", |
| ... | ... | @@ -193,7 +193,7 @@ export function pullRequestSurfaceId(target: { |
| 193 | 193 | return `pull-request:${scope}${encodeURIComponent(target.projectId)}:${encodeURIComponent(target.repository)}:${target.number}`; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | export function pullRequestSurface(target: { | |
| 196 | function pullRequestSurface(target: { | |
| 197 | 197 | environmentId?: string; |
| 198 | 198 | projectId: string; |
| 199 | 199 | repository: string; |
apps/web/src/test/reactHookHarness.ts+1-1| ... | ... | @@ -34,7 +34,7 @@ import type { Dispatch, SetStateAction } from "react"; |
| 34 | 34 | * Call `beginRender()` before each component invocation and `reset()` in |
| 35 | 35 | * `beforeEach` to drop persisted state between tests. |
| 36 | 36 | */ |
| 37 | export function createReactHookHarness() { | |
| 37 | function createReactHookHarness() { | |
| 38 | 38 | let cursor = 0; |
| 39 | 39 | let slots: unknown[] = []; |
| 40 | 40 | const nextIndex = () => cursor++; |
apps/web/src/themePalette.ts+3-8| ... | ... | @@ -22,15 +22,10 @@ export { EMBER_THEME, GROVE_THEME, IRIS_THEME, OCEAN_THEME, T3_CHAT_THEME, THEME |
| 22 | 22 | export type { ThemeAppearance, ThemeColorRole, ThemeColors, ThemeDefinition, ThemeVariants }; |
| 23 | 23 | |
| 24 | 24 | export const T3_CHAT_THEME_ID = "t3-chat" as const; |
| 25 | export const T3_CHAT_THEME_LABEL = "T3 Chat"; | |
| 26 | export const GROVE_THEME_ID = "grove" as const; | |
| 27 | export const GROVE_THEME_LABEL = "Grove"; | |
| 25 | const GROVE_THEME_ID = "grove" as const; | |
| 28 | 26 | export const OCEAN_THEME_ID = "ocean" as const; |
| 29 | export const OCEAN_THEME_LABEL = "Ocean"; | |
| 30 | export const EMBER_THEME_ID = "ember" as const; | |
| 31 | export const EMBER_THEME_LABEL = "Ember"; | |
| 32 | export const IRIS_THEME_ID = "iris" as const; | |
| 33 | export const IRIS_THEME_LABEL = "Iris"; | |
| 27 | const EMBER_THEME_ID = "ember" as const; | |
| 28 | const IRIS_THEME_ID = "iris" as const; | |
| 34 | 29 | export const THEME_FILE_VERSION = 1 as const; |
| 35 | 30 | export const CUSTOM_THEMES_STORAGE_KEY = "t3code:themes:v1"; |
| 36 | 31 | export const THEME_FOLLOW_SYSTEM_STORAGE_KEY = "t3code:theme-follow-system"; |
apps/web/src/versionSkew.ts+1-1| ... | ... | @@ -12,7 +12,7 @@ export interface VersionMismatch { |
| 12 | 12 | readonly hint: string; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | export const VERSION_MISMATCH_DISMISSALS_STORAGE_KEY = "t3code:version-mismatch-dismissals:v1"; | |
| 15 | const VERSION_MISMATCH_DISMISSALS_STORAGE_KEY = "t3code:version-mismatch-dismissals:v1"; | |
| 16 | 16 | |
| 17 | 17 | // Runtime failures retain their identity until the next attempt. Dismiss only |
| 18 | 18 | // that attempt, across chat remounts, without clearing the error in Settings. |