Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: panel side setting, hidden-file browsing, media previews, and video attachments #8047

ClosedHEREISCB(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/8047/headopened View on GitHub

What changed

1. Panel side preference (Settings → Appearance → "Panel side")

  • New rightPanelSide client setting in packages/contracts (synced on web and desktop, searchable in settings search).
  • Setting it to Left docks the tool panel (files, terminal, diff, browser preview, agents) on the left and moves the chat column to the right.
  • The resize handle, panel border, maximize control, and titlebar button reservations all follow the chosen side.
  • Inside the Files surface, the tree mirrors too: docked left, the explorer hugs the outer edge and files open toward the chat.

2. Hidden files in the workspace file browser

  • The file tree is fed by the native search index, which bakes in .gitignore — so ignored files and some dotfiles could never be shown, and the indexer exposes no option to include them.
  • Added an eye toggle in the Files tab header ("Show hidden and ignored files") backed by a new includeHidden flag on projectsListEntries: the server walks the filesystem directly (breadth-first, .git and node_modules still skipped, same 25k entry cap). Ships with a server test.

3. Video/audio preview in the Files panel

  • Selecting an .mp4/.mov/.webm/.m4v used to fail the binary-file check; media files now render inline players via signed asset URLs (audio too: mp3, wav, ogg, flac, m4a). Extension allowlists extended in packages/shared/filePreview and the asset access layer.

4. Video attachments in chat

  • New ChatVideoAttachment in the wire contract: MP4/MOV/WebM up to 25 MB per file (kept as a one-shot data-URL upload, same transport as images).
  • Composer accepts drop/paste/pick, shows a first-frame chip; the timeline renders an inline <video> player that persists with the thread.
  • No provider ingests raw video, so each adapter passes the stored file's absolute path as a text part (OpenCode gets a real file part) — agents can then work on the file with their tools. Videos are skipped in localStorage draft persistence (too large) and show the existing "may not persist" badge.
  • Mobile renders video attachments as a plain tile for now (decision: not supported there yet).

Bugs found and fixed along the way

  • Revert prune deleted non-image attachments from disk: the keep-set builder in ProjectionPipeline skipped any attachment whose type wasn't "image", so any future non-image attachment was deleted on the next thread revert. The skip is removed; attachmentRelativePath now covers every attachment type.
  • A file dropped outside the chat column navigated the whole app to the file (Chromium default): a dropped video would play full-window and then "disappear". A window-level dragover/drop preventDefault guard in the root route suppresses the default without interfering with real drop targets.
  • Left-docked panel clipped under floating titlebar controls: the collapsed-sidebar toggle and the maximize/panel cluster overlap the top corners; the tab bar and chat header now reserve space based on which side the panel is docked.

Notes / known ceilings

  • Videos over 25 MB are refused with a clear error; chunked upload is the path if larger recordings are needed.
  • Video seeking before full buffer is limited (asset endpoint doesn't serve range requests yet).
  • Verified: typecheck across contracts/shared/server/web/desktop/client-runtime; focused tests for WorkspaceEntries, attachmentStore, imageMime, Normalizer, ProjectionPipeline, AssetAccess, the five provider adapters, composer draft store, and desktop client settings all pass. Tested live in the web app on macOS.

Note

Medium Risk Touches orchestration attachment persistence, multiple provider turn payloads, and a new filesystem listing path; regressions could affect message sends, agent context, or large workspace trees when showing hidden files.

Overview Adds video chat attachments (MP4/MOV/WebM up to 25 MB): contracts and the turn normalizer persist video attachments, the composer/timeline render inline players, and Claude/Codex/Cursor/Grok adapters send a text note with the on-disk path instead of raw video. Desktop exposes getPathForFile so non-inline drops (PDF, CSV, oversized media) insert quoted paths into the message; CSP gains media-src for blob and signed asset playback.

Workspace layout gains Panel side and Sidebar side settings: the tool panel and thread sidebar can dock left or right, with resize handles, titlebar insets, and file-explorer placement updated to match.

Files panel adds a persisted show hidden/ignored toggle backed by a direct filesystem walk when includeHidden is set (still skips .git / node_modules, caps at 25k entries). Image, video, and audio workspace files preview via signed URLs; asset signing treats all media extensions as exact-path claims.

Smaller fixes: attachment cleanup on revert includes non-image types, blob preview handoff/revocation covers videos, window-level drag/drop prevents navigating away from the app, and binary files get a neutral “no preview” state instead of a generic error.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eaac3c505b98cf40a8bf285d7a0769f407c7acf8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add video attachments, panel docking sides, hidden-file browsing, and media previews

  • Adds video attachment support end-to-end: ChatComposer.tsx accepts MP4/MOV/WebM (≤25 MiB), provider adapters (Claude, Codex, Cursor, Grok) pass non-image attachments as text path prompts via videoAttachmentPromptText, and Normalizer.ts validates and persists video types with PROVIDER_SEND_TURN_MAX_VIDEO_BYTES.
  • Adds configurable docking sides for the right panel (rightPanelSide) and app sidebar (appSidebarSide) in client settings, with layout, border, and resize handle adjustments across ChatView.tsx, RightPanelTabs.tsx, PreviewPanelShell.tsx, and AppSidebarLayout.tsx.
  • Adds hidden/ignored file browsing via a toggle in FileBrowserPanel.tsx, backed by a filesystem walker in WorkspaceEntries.ts that includes dotfiles and gitignored entries while skipping .git and node_modules.
  • Adds inline media previews (image, video, audio) in FilePreviewPanel.tsx and updates desktop CSP media-src in ElectronProtocol.ts to allow blob: playback.
  • Risk: video attachments are in-memory only and not persisted in composer drafts; non-image adapters receive resolved file paths as text prompts, not raw file bytes. Dropped non-inline files on desktop insert their on-disk paths into the composer text via desktopBridge.getPathForFile.
Macroscope summarized eaac3c5.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 65b66d91-059c-4e56-aae4-54165edfc88e

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/438b25621e168485022dee52757962090d11a004/apps/web/src/components/chat/MessagesTimeline.tsx#L1035

      Opening an image with a video attached adds the video's previewUrl to the expanded image gallery, so navigating to that slide renders a broken <img>. regularImages still contains videos after the new video branch; pass only attachments with type === "image" to buildExpandedImagePreview.

      Also found in 1 other location(s)

      apps/web/src/components/chat/ChatComposer.tsx:3199

      The image preview click still calls buildExpandedImagePreview(composerImages, image.id), but composerImages now includes videos and that helper includes every item with a previewUrl without checking type. With an image and video attached, opening the image creates a gallery containing the video&#39;s blob URL as an image item, so navigating the expanded image dialog reaches a broken/non-image slide. Pass only image attachments (and likewise filter annotation previews) when building the expanded image preview.

      ✅ Resolved in c176294337df80b90605f71f77180fc7880ca925

    4. UI consistency review found one regression in the attachment lightbox (two call sites) and one toggle-affordance inconsistency in the new Files header control. The panel-side layout work (PreviewPanelShell, RightPanelResizeHandle, RightPanelTabs, FilePreviewPanel explorer side, titlebar-inset conditions) looks coherent: borders, resize edge, titlebar insets and the collapsed-sidebar inset are all switched together, and the new settings row matches the neighbouring Select row exactly.

      Posted via Macroscope — UI Consistency
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      chat/ChatComposer.tsx

      Same issue as in the timeline: composerImages can now hold videos, and the image thumbnail's expand handler (line 3199) still passes the full array into buildExpandedImagePreview, whose result is rendered as <img> by ExpandedImageDialog. With a video staged alongside an image, arrow-navigating the lightbox shows a broken frame. Consider filtering to image attachments.

                                    onClick={() => {
      -                                const preview = buildExpandedImagePreview(composerImages, image.id);
      +                                const preview = buildExpandedImagePreview(
      +                                  composerImages.filter((item) => item.type === "image"),
      +                                  image.id,
      +                                );

      No longer relevant as of c176294337df80b90605f71f77180fc7880ca925

    5. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This is a large, cross-cutting feature addition spanning attachment contracts and provider sends, filesystem traversal, media authorization/playback, and workspace layout behavior. Several supplied comments also identify unresolved attachment and docking/drop interaction risks that require validation across desktop and web paths.

      Not approved because:

      • 4 blocking correctness issues found at or above your repo's Minimum Blocking Severity
      Adjust the Minimum Blocking Severity for this repo — including turning it Off — in [Settings](https://app.macroscope.com/pingdotgg/settings#Repos). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    6. UI consistency review of the changed web surfaces. Two findings, both in the new video-attachment / left-dock paths. The rest (panel side plumbing in PreviewPanelShell / RightPanelResizeHandle / FilePreviewPanel, the Button-based hidden-files toggle, the settings Select row) follows the existing primitive and Tailwind ownership conventions.

      Posted via Macroscope — UI Consistency
    7. UI consistency review of the panel-side / hidden-files / video-attachment changes. Two findings: a desktop CSP gap that blocks the new <video>/<audio> playback in the Electron renderer, and an icon-geometry mismatch in the new Files-tab toggle. The earlier lightbox and header-inset findings look resolved.

      Posted via Macroscope — UI Consistency
      @@ -148,12 +159,15 @@
      148159 </div>
      149160 );
      150161 }
      151162
      152163 return assetUrl._tag === "Success" ? (
      153164 <div className="flex min-h-0 flex-1 items-center justify-center overflow-auto p-4">
      154- <img
      155- className="max-h-full max-w-full object-contain"
      156- src={assetUrl.url}
      157- alt={props.alt}
      158- onError={() => setFailedUrl(assetUrl.url)}
      159- />
      165+ {props.kind === "image" ? (
      166+ <img
      167+ className="max-h-full max-w-full object-contain"
      168+ src={assetUrl.url}
      169+ alt={props.alt}
      170+ onError={() => setFailedUrl(assetUrl.url)}
      171+ />
      172+ ) : props.kind === "video" ? (
      173+ <video
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      These are the app's first <video>/<audio> elements, and the desktop window's CSP declares no media-src: makeDesktopContentSecurityPolicy emits default-src 'self' plus an explicit img-src 'self' <scheme>: blob: data: http: https: (apps/desktop/src/electron/ElectronProtocol.ts), so media falls back to default-src 'self'. The signed asset URL here lives on the environment's http(s) origin, so in the desktop app the fetch is refused before a byte moves and this surface renders "Unable to load workspace video" — while the sibling <img> branch works because img-src enumerates those schemes. The same applies to the blob-backed previews added in ChatComposer and MessagesTimeline (blob: does not match 'self'); PullRequestMarkdown already documents this exact constraint as the reason it links out instead of playing.

      Consider adding a matching media-src directive next to img-src in makeDesktopContentSecurityPolicy (and the corresponding assertion in ElectronProtocol.test.ts) so video/audio resolve from the same sources images already do.

      Posted via Macroscope — UI Consistency
    8. UI consistency review of the panel-side / hidden-files / video-attachment changes. Two findings: a desktop CSP gap that blocks the new <video>/<audio> playback in the Electron renderer, and an icon-geometry mismatch in the new Files-tab toggle. The earlier lightbox and header-inset findings look resolved.

      Posted via Macroscope — UI Consistency
      @@ -148,12 +159,15 @@
      148159 </div>
      149160 );
      150161 }
      151162
      152163 return assetUrl._tag === "Success" ? (
      153164 <div className="flex min-h-0 flex-1 items-center justify-center overflow-auto p-4">
      154- <img
      155- className="max-h-full max-w-full object-contain"
      156- src={assetUrl.url}
      157- alt={props.alt}
      158- onError={() => setFailedUrl(assetUrl.url)}
      159- />
      165+ {props.kind === "image" ? (
      166+ <img
      167+ className="max-h-full max-w-full object-contain"
      168+ src={assetUrl.url}
      169+ alt={props.alt}
      170+ onError={() => setFailedUrl(assetUrl.url)}
      171+ />
      172+ ) : props.kind === "video" ? (
      173+ <video
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      These are the app's first <video>/<audio> elements, and the desktop window's CSP declares no media-src: makeDesktopContentSecurityPolicy emits default-src 'self' plus an explicit img-src 'self' <scheme>: blob: data: http: https: (apps/desktop/src/electron/ElectronProtocol.ts), so media falls back to default-src 'self'. The signed asset URL here lives on the environment's http(s) origin, so in the desktop app the fetch is refused before a byte moves and this surface renders "Unable to load workspace video" — while the sibling <img> branch works because img-src enumerates those schemes. The same applies to the blob-backed previews added in ChatComposer and MessagesTimeline (blob: does not match 'self'); PullRequestMarkdown already documents this exact constraint as the reason it links out instead of playing.

      Consider adding a matching media-src directive next to img-src in makeDesktopContentSecurityPolicy (and the corresponding assertion in ElectronProtocol.test.ts) so video/audio resolve from the same sources images already do.

      Posted via Macroscope — UI Consistency
    9. @@ -140 +140,21 @@
      140140
      141+// The search index honors gitignore, so ignored and dot-prefixed entries never
      142+// reach it. `includeHidden` listings walk the filesystem directly instead;
      143+// these two are still skipped so the tree stays usable.
      144+const HIDDEN_WALK_SKIP_DIRS = new Set([".git", "node_modules"]);
      145+const HIDDEN_WALK_MAX_ENTRIES = 25_000;
      146+
      147+async function walkWorkspaceEntries(
      148+ root: string,
      149+ join: (left: string, right: string) => string,
      150+): Promise<ProjectListEntriesResult> {
      151+ const entries: Array<ProjectListEntriesResult["entries"][number]> = [];
      152+ let truncated = false;
      153+ // Breadth-first so a truncated listing keeps the shallow structure intact.
      154+ const pendingDirs = [""];
      155+ for (let index = 0; index < pendingDirs.length && !truncated; index += 1) {
      156+ const relativeDir = pendingDirs[index]!;
      157+ let dirents: ReadonlyArray<{ readonly name: string; isDirectory(): boolean }>;
      158+ try {
      159+ dirents = await NodeFSP.readdir(join(root, relativeDir), { withFileTypes: true });
      160+ } catch {
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium workspace/WorkspaceEntries.ts:160

      When the normalized workspace root is unreadable or disappears, includeHidden listing returns a successful empty entries array instead of reporting WorkspaceEntriesReadDirectoryError (or the corresponding index failure). The catch at line 160 also handles the root directory, so distinguish the root read from nested-directory reads and propagate the root failure.

      🤖 Copy this AI Prompt to have your agent fix this:
      In file @apps/server/src/workspace/WorkspaceEntries.ts around line 160:
      
      When the normalized workspace root is unreadable or disappears, `includeHidden` listing returns a successful empty `entries` array instead of reporting `WorkspaceEntriesReadDirectoryError` (or the corresponding index failure). The catch at line 160 also handles the root directory, so distinguish the root read from nested-directory reads and propagate the root failure.
      @@ -19,3 +19,9 @@
      1919 start it in the background. T3 Code opens another new thread and shows an **Open** action for the
      2020 thread that started. The new thread keeps the selected workspace mode and base branch. If **New
      2121 worktree** is selected, each background thread creates its own worktree.
      22+
      23+## Attachments
      24+
      25+Drop, paste, or pick images (GIF, JPEG, PNG, WebP) and videos (MP4, MOV, WebM) to attach them to a
      26+message. Up to 8 files per message; images over 10 MB are compressed to fit, videos can be up to
      27+25 MB. Attached videos play inline in the conversation. Coding agents cannot watch video directly,
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟢 Low user/composer.md:26

      Images over 10 MB can still be rejected when compressImageToByteLimit returns too_large, so the documentation's claim that they are compressed to fit is incorrect. Describe compression as an attempt and note that very large or poorly compressible images may still be refused.

      Suggested change
      26-message. Up to 8 files per message; images over 10 MB are compressed to fit, videos can be up to
      27-25 MB. Attached videos play inline in the conversation. Coding agents cannot watch video directly,
      26+message. Up to 8 files per message; images over 10 MB are compressed when possible, but very large or poorly compressible images can still be refused; videos can be up to
      27+25 MB. Attached videos play inline in the conversation. Coding agents cannot watch video directly,
      🤖 Copy this AI Prompt to have your agent fix this:
      In file @docs/user/composer.md around lines 26-27:
      
      Images over 10 MB can still be rejected when `compressImageToByteLimit` returns `too_large`, so the documentation's claim that they are compressed to fit is incorrect. Describe compression as an attempt and note that very large or poorly compressible images may still be refused.
      @@ -2517,3 +2530,6 @@
      25172530 const nextImages: ComposerImageAttachment[] = [];
      25182531 let compressionError: string | null = null;
      25192532 for (const file of acceptedFiles) {
      2533+ if (file.type.startsWith("video/")) {
      2534+ // Videos ship byte-for-byte; there is no client-side recompression.
      2535+ nextImages.push({
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High chat/ChatComposer.tsx:2535

      Videos are treated as images when restored from the prompt stash, so a stashed video is dispatched with type: "image" and its video MIME type; larger videos are also cleared despite failing image compression. The stash flow must exclude videos or persist and hydrate their type and data end-to-end.

      🤖 Copy this AI Prompt to have your agent fix this:
      In file @apps/web/src/components/chat/ChatComposer.tsx around line 2535:
      
      Videos are treated as images when restored from the prompt stash, so a stashed video is dispatched with `type: "image"` and its video MIME type; larger videos are also cleared despite failing image compression. The stash flow must exclude videos or persist and hydrate their type and data end-to-end.
      @@ -1265,3 +1265,4 @@
      12651265
      12661266 for (const attachment of input.attachments ?? []) {
      12671267 if (attachment.type !== "image") {
      1268+ // Claude ingests no raw video; hand the agent the stored file's path.
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High Layers/ClaudeAdapter.ts:1268

      A non-image attachment is silently omitted when resolveAttachmentPath returns null, so sendTurn succeeds without sending the attachment or notifying either the user or agent. Unlike the image branch, this path does not validate or read the file; return ProviderAdapterRequestError for an invalid path and propagate filesystem read failures before adding the prompt.

      Also found in 1 other location(s)

      apps/server/src/provider/Layers/GrokAdapter.ts:975

      The new video branch returns a text prompt immediately without checking that attachmentPath exists or is readable. resolveAttachmentPath only performs path normalization/containment and does not touch the filesystem, whereas the image branch&#39;s fileSystem.readFile surfaces missing-file errors. If attachment metadata survives while its stored video is missing or inaccessible, sendTurn succeeds and tells Grok the file is available at a nonexistent path, leaving the agent unable to process the attachment instead of returning a clear request error.

      🤖 Copy this AI Prompt to have your agent fix this:
      In file @apps/server/src/provider/Layers/ClaudeAdapter.ts around line 1268:
      
      A non-image attachment is silently omitted when `resolveAttachmentPath` returns `null`, so `sendTurn` succeeds without sending the attachment or notifying either the user or agent. Unlike the image branch, this path does not validate or read the file; return `ProviderAdapterRequestError` for an invalid path and propagate filesystem read failures before adding the prompt.
      
      Also found in 1 other location(s):
      - apps/server/src/provider/Layers/GrokAdapter.ts:975 -- The new video branch returns a text prompt immediately without checking that `attachmentPath` exists or is readable. `resolveAttachmentPath` only performs path normalization/containment and does not touch the filesystem, whereas the image branch's `fileSystem.readFile` surfaces missing-file errors. If attachment metadata survives while its stored video is missing or inaccessible, `sendTurn` succeeds and tells Grok the file is available at a nonexistent path, leaving the agent unable to process the attachment instead of returning a clear request error.
      
      @@ -0,0 +1,12 @@
      1+# Workspace panel
      2+
      3+The tool panel (files, terminal, diff, browser preview, agents) docks to the right of the chat by
      4+default. Move it to the left side in **Settings → Appearance → Panel side**; the chat column then sits
      5+on the right.
      6+
      7+## Files
      8+
      9+The Files tab lists your workspace. The listing follows your `.gitignore`, so ignored files and
      10+some dotfiles are hidden by default. Use the eye toggle in the Files tab header to show hidden and
      11+ignored files (`.git` and `node_modules` stay hidden). Selecting an image, video, or audio file
      12+previews it inline; other files open as text.
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟢 Low user/workspace-panel.md:12

      Selecting .htm, .html, or .pdf files opens the browser preview rather than the documented text view. The final sentence says every non-media file opens as text, so it should explicitly mention these browser-previewed formats.

      Suggested change
      12-previews it inline; other files open as text.
      12+previews it inline; `.htm`, `.html`, and `.pdf` files open in the browser preview; other files open as text.
      🤖 Copy this AI Prompt to have your agent fix this:
      In file @docs/user/workspace-panel.md around line 12:
      
      Selecting `.htm`, `.html`, or `.pdf` files opens the browser preview rather than the documented text view. The final sentence says every non-media file opens as text, so it should explicitly mention these browser-previewed formats.
    10. One finding: the new window-level drag/drop preventDefault in apps/web/src/routes/__root.tsx cancels the browser default for every drag, not just file drags, which suppresses native text drops into the app's <textarea>/<input> surfaces. Details inline.

      The panel-side, hidden-files toggle, and media-preview changes reviewed in earlier runs look addressed: the desktop CSP now declares media-src, the eye icon is sized at the call site to match the neighbouring icon-xs refresh button, buildExpandedImagePreview excludes videos from the <img> gallery, and the chat header's collapsed-sidebar inset is now opt-out via reserveCollapsedSidebarInset when the panel is docked left. Side-aware geometry in PreviewPanelShell / RightPanelResizeHandle / FilePreviewPanel (border edge, resize edge, flex-row-reverse) is consistent with the useResizableWidth edge contract.

      Posted via Macroscope — UI Consistency
      @@ -93,3 +93,11 @@
      9393 const { authGateState } = Route.useRouteContext();
      9494 const primaryEnvironmentAuthenticated = authGateState.status === "authenticated";
      9595
      96+ // A file dropped outside an explicit drop target must not make the browser
      97+ // navigate to (and render) the file, replacing the app. Window-level
      98+ // preventDefault only suppresses that default; real drop targets handle
      99+ // their events first.
      100+ useEffect(() => {
      101+ const preventWindowFileDrop = (event: DragEvent) => {
      102+ event.preventDefault();
      103+ };

      This cancels the default action for all drags, not just file drags. preventDefault() from a window listener still applies after the target's own handler runs, so drags the target intentionally leaves to the browser lose their default too — dropping selected text into a native <textarea>/<input> (PR description editor, diff/review comment fields) no longer inserts anything, and every non-target area now reports a valid drop target on dragover.

      Consider gating on the file payload, which is the only case that triggers the navigation this guards against:

      Suggested change
      101- const preventWindowFileDrop = (event: DragEvent) => {
      102- event.preventDefault();
      103- };
      101+ const preventWindowFileDrop = (event: DragEvent) => {
      102+ // Only file drags navigate; leave text drags to their drop target's default.
      103+ if (!event.dataTransfer?.types.includes("Files")) return;
      104+ event.preventDefault();
      105+ };
      Posted via Macroscope — UI Consistency
    11. @@ -2494,14 +2534,14 @@
      24942534 const acceptedFiles: File[] = [];
      24952535 let error: string | null = null;
      2536+ // Files the agent cannot receive inline (CSV, PDF, archives, oversized or
      2537+ // exotic media) are referenced by their path instead of rejected, so the
      2538+ // agent can open them with its own tools.
      2539+ const pathOnlyFiles: File[] = [];
      24962540 for (const file of files) {
      2497- if (!file.type.startsWith("image/")) {
      2498- error = `Unsupported file type for '${file.name}'. Please attach image files only.`;
      2499- continue;
      2500- }
      2501- if (!isProviderSendTurnSupportedImageMimeType(file.type)) {
      2502- error = `'${file.name}' is not a supported image type. Attach GIF, JPEG, PNG, or WebP images.`;
      2541+ if (!isInlineAttachableFile(file)) {
      2542+ pathOnlyFiles.push(file);
      25032543 continue;
      25042544 }
      25052545 if (reservedCount >= PROVIDER_SEND_TURN_MAX_ATTACHMENTS) {
      2506- error = `You can attach up to ${PROVIDER_SEND_TURN_MAX_ATTACHMENTS} images per message.`;
      2546+ error = `You can attach up to ${PROVIDER_SEND_TURN_MAX_ATTACHMENTS} files per message.`;
      25072547 break;
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium chat/ChatComposer.tsx:2547

      When the attachment limit is reached, break stops scanning the remaining files, so later non-inline files never reach insertDroppedFilePaths and are silently omitted. Dropping an image followed by a PDF with full capacity therefore reports only the limit error instead of adding the PDF by path; use continue so scanning proceeds.

      🤖 Copy this AI Prompt to have your agent fix this:
      In file @apps/web/src/components/chat/ChatComposer.tsx around line 2547:
      
      When the attachment limit is reached, `break` stops scanning the remaining files, so later non-inline files never reach `insertDroppedFilePaths` and are silently omitted. Dropping an image followed by a PDF with full capacity therefore reports only the limit error instead of adding the PDF by path; use `continue` so scanning proceeds.
    12. UI consistency review of the new panel/sidebar side options and the media attachment surfaces. The previously flagged items (desktop media-src CSP, Toggle icon geometry in the Files header, video entries leaking into the <img> lightbox, and the duplicated collapsed-sidebar inset on the chat header) are resolved.

      Two remaining layout regressions, both in the new side-docking paths, are noted inline.

      Posted via Macroscope — UI Consistency
      @@ -209,7 +214,13 @@
      209214 }, [navigate, pathname]);
      210215
      211216 return (
      212- <SidebarProvider className="h-dvh! min-h-0!" defaultOpen style={sidebarProviderStyle}>
      217+ <SidebarProvider
      218+ // Docked right, the sidebar renders after the content in the flex row;
      219+ // the primitive already handles its own borders and rail per side.
      220+ className={cn("h-dvh! min-h-0!", sidebarSide === "right" && "flex-row-reverse")}
      221+ defaultOpen
      222+ style={sidebarProviderStyle}
      223+ >
      213224 <ProjectProjectionRetention />
      214225 <Sidebar
      215- side="left"
      226+ side={sidebarSide}
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Docking the sidebar right flips the column, but the sidebar's titlebar chrome stays left-anchored, so two things break with appSidebarSide: "right":

      • SidebarControl is fixed left-[var(--workspace-controls-left)] (line 107). With the sidebar docked right and expanded, that floating toggle now sits over the chat/page header's leading edge — and WorkspacePageHeader only reserves that inset while the sidebar is collapsed (COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS), so the toggle overlaps the breadcrumb instead of the sidebar header it used to cover.
      • SidebarBrand keeps ml-[var(--workspace-titlebar-content-left)] (sidebar/SidebarChrome.tsx:87). In a right-docked sidebar that is now a dead indent of ~44px — ~122px on macOS desktop, where --workspace-controls-left is the 90px traffic-light inset — with no control in it.

      Consider mirroring the chrome with the side the same way the tool panel was handled here: anchor SidebarControl to right-[var(--workspace-controls-right)] when sidebarSide === "right", and mirror the brand margin plus the collapsed-header inset (a side-aware variant of COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS, analogous to the new reserveCollapsedSidebarInset prop) rather than leaving both hard-coded to the left edge.

      Posted via Macroscope — UI Consistency
      @@ -6605,4 +6633,4 @@
      66056633 }
      66066634 keybindings={keybindings}
      66076635 availableEditors={availableEditors}
      6608- rightPanelOpen={rightPanelOpen}
      6636+ rightPanelOpen={rightPanelOpen && inlineRightPanelOwnsTitleBar}
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      With the panel docked left and open (non-maximized), inlineRightPanelOwnsTitleBar is false, so ChatHeader takes its rightPanelOpen === false branch and reserves pr-16 (64px, chat/ChatHeader.tsx:380). But the floating cluster that now overlays the chat header in this mode is the open-panel cluster: RightPanelMaximizeControl plus both panel toggles — three Toggle size="sm" buttons (~92px) at a ~13px right inset, which is why the RightPanelTabs path reserves pr-28 (112px) for it. The chat header is therefore ~25-30px short, and since the cluster is z-50 with pointer events, the maximize control both covers and swallows clicks on the rightmost header action.

      Consider threading a distinct signal (or reusing the 112px reserve) so the chat header reserves the full cluster width whenever the maximize control is present, instead of rightPanelOpen standing in for both "the cluster lives elsewhere" and "the cluster is only two buttons wide".

      Posted via Macroscope — UI Consistency
    13. Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).

      Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eaac3c505b98cf40a8bf285d7a0769f407c7acf8. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -139,3 +143,4 @@
      139143 export function AppSidebarLayout({ children }: { children: ReactNode }) {
      140144 const navigate = useNavigate();
      141145 const legacySidebarEnabled = useLegacySidebarEnabled();
      146+ const sidebarSide = useClientSettings((settings) => settings.appSidebarSide);

      Right sidebar overlaps titlebar controls

      Medium Severity

      Docking the app sidebar on the right still parks the floating toggle at left-[var(--workspace-controls-left)] and only indents the left edge when the sidebar is collapsed. With the sidebar open on the right, that toggle (and macOS traffic lights) sit on top of the chat or left-docked panel header, while SidebarBrand still reserves unused left space inside the right-hand sidebar.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eaac3c505b98cf40a8bf285d7a0769f407c7acf8. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -2493,10 +2533,10 @@
      24932533 let reservedCount = composerImagesRef.current.length + pendingCount;
      24942534 const acceptedFiles: File[] = [];
      24952535 let error: string | null = null;
      2536+ // Files the agent cannot receive inline (CSV, PDF, archives, oversized or
      2537+ // exotic media) are referenced by their path instead of rejected, so the
      2538+ // agent can open them with its own tools.
      2539+ const pathOnlyFiles: File[] = [];
      24962540 for (const file of files) {
      2497- if (!file.type.startsWith("image/")) {
      2498- error = `Unsupported file type for '${file.name}'. Please attach image files only.`;
      2499- continue;
      2500- }
      2501- if (!isProviderSendTurnSupportedImageMimeType(file.type)) {
      2502- error = `'${file.name}' is not a supported image type. Attach GIF, JPEG, PNG, or WebP images.`;
      2541+ if (!isInlineAttachableFile(file)) {
      2542+ pathOnlyFiles.push(file);

      Attachment cap skips path-only files

      Medium Severity

      Once the inline attachment limit is hit, the intake loop breaks instead of finishing the drop. Files that should become path references (CSV, PDF, oversized video, and anything after the extra image) are never passed to insertDroppedFilePaths and disappear aside from the generic attachment-limit error.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eaac3c505b98cf40a8bf285d7a0769f407c7acf8. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -2501,11 +2541,18 @@
      2501- if (!isProviderSendTurnSupportedImageMimeType(file.type)) {
      2502- error = `'${file.name}' is not a supported image type. Attach GIF, JPEG, PNG, or WebP images.`;
      2541+ if (!isInlineAttachableFile(file)) {
      2542+ pathOnlyFiles.push(file);
      25032543 continue;
      25042544 }
      25052545 if (reservedCount >= PROVIDER_SEND_TURN_MAX_ATTACHMENTS) {
      2506- error = `You can attach up to ${PROVIDER_SEND_TURN_MAX_ATTACHMENTS} images per message.`;
      2546+ error = `You can attach up to ${PROVIDER_SEND_TURN_MAX_ATTACHMENTS} files per message.`;
      25072547 break;
      25082548 }
      25092549 acceptedFiles.push(file);
      25102550 reservedCount += 1;
      25112551 }
      2552+
      2553+ if (pathOnlyFiles.length > 0) {
      2554+ const unresolvedNames = insertDroppedFilePaths(pathOnlyFiles);
      2555+ if (unresolvedNames.length > 0) {
      2556+ error = isElectron
      2557+ ? `Could not resolve a file path for ${unresolvedNames.join(", ")}.`
      2558+ : `${unresolvedNames.join(", ")} can't be attached here. Open the desktop app to reference files by path, or attach GIF, JPEG, PNG, or WebP images.`;

      Busy composer misreports path drops

      Low Severity

      When insertComposerTextAtEnd returns false (composer connecting, in an approval state, or project selection required), resolved paths are folded into unresolvedNames. The desktop error then claims those files’ paths could not be resolved even though getPathForFile already succeeded, so the drop is refused with the wrong reason.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eaac3c505b98cf40a8bf285d7a0769f407c7acf8. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -1162,0 +1179,21 @@
      1179+ onValueChange={(value) => {
      1180+ if (value === "left" || value === "right") {
      1181+ updateSettings({ rightPanelSide: value });
      1182+ }
      1183+ }}
      1184+ >
      1185+ <SelectTrigger className="w-full sm:w-40" aria-label="Panel side">
      1186+ <SelectValue>{settings.rightPanelSide === "left" ? "Left" : "Right"}</SelectValue>
      1187+ </SelectTrigger>
      1188+ <SelectPopup align="end" alignItemWithTrigger={false}>
      1189+ <SelectItem hideIndicator value="right">
      1190+ Right
      1191+ </SelectItem>
      1192+ <SelectItem hideIndicator value="left">
      1193+ Left
      1194+ </SelectItem>
      1195+ </SelectPopup>
      1196+ </Select>
      1197+ }
      1198+ />
      1199+

      Restore defaults ignores sidebar side

      Low Severity

      appSidebarSide has a per-row reset but is omitted from changedSettingLabels and the restoreDefaults payload. Global Restore defaults therefore leaves a right-docked sidebar in place and does not list it in the confirmation dialog, unlike other appearance preferences.

      Additional Locations (1)
      Fix in Cursor Fix in Web
      Triggered by learned rule: Restore defaults on General settings page is intentionally global — not scoped per-page Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eaac3c505b98cf40a8bf285d7a0769f407c7acf8. Configure [here](https://www.cursor.com/dashboard/bugbot).
    14. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

      This branch combines panel placement, hidden-file browsing, media previews, video storage, desktop protocol changes, and client preferences across 42 files. These behaviors have separate security and UI contracts and should not be accepted or retired as one unit.

      If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.

Sign in to join this conversation.