t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Opening Files from the right panel toggle's context menu widens the panel instead of keeping the width I set

Open svenrabe opened this issue 3 weeks ago • 2 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a thread with the right panel closed.
  2. Open the right panel, drag it to a comfortable width, then close it again.
  3. Right-click the Toggle right panel button in the top-right header controls and choose Files.

Expected behavior

The right panel opens at the width I last set. Opening the Files surface does not change the panel width.

Actual behavior

The right panel opens noticeably wider than the width I set. I have to drag it back to my width every time I open Files this way, so the width I set by dragging is not respected.

Impact

Minor bug or occasional failure

Version or commit

0.1.8-nightly.20261105.4218 (desktop, nightly channel)

Environment

macOS 27.2, T3 Code desktop app (Nightly)

Workaround

Drag the side panel back to the desired width after each open.

svenrabe avatar Nov 07 '26 16:11 svenrabe

Thanks for the report. I tried this on current main (e455200077) and on the code of the build you named (v0.1.8-nightly.20261105.4218), and could not reproduce it.

What I ran, in the web app with a fresh project:

  1. Opened the right panel, dragged it to about 412 px, closed it.
  2. Right-clicked Toggle right panel. No T3 Code menu appears: the button has no context menu in either build, and the desktop app's native right-click menu only offers Cut, Copy, Paste and Select All, plus spelling, link and image items where they apply. There is no Files entry there.
  3. Opened the panel with a left click and chose Files from "Open a surface". It opened at the 412 px I had set.
  4. Closed it, reloaded, and reopened with the toggle, which restored the Files tab. Still 412 px.

To narrow it down, could you share:

  • A screenshot or short recording of the menu you right-click and the Files item you choose. If it's a different control (the + button in the panel, a file link in the chat, a keybinding), which one?
  • Your window width, and whether you switch threads between setting the width and opening Files (the width is remembered per thread).
  • Roughly the width you set and the width it opens at.

juliusmarminge avatar Nov 07 '26 16:11 juliusmarminge

Thanks for digging into this, and sorry, my steps were wrong. There's no context menu involved. I left-click the Toggle right panel button (rightmost icon in the header), and the panel opens on Files.

I re-tested, and you're right that it keeps its width within one thread. What I'm actually seeing:

  1. In thread A, open the right panel and drag it narrower. Close and reopen it: it keeps my width.
  2. Switch to thread B (or a new thread) and click Toggle right panel: it opens at the default width (~540 px), not the width I just set.

Looking at the code, this seems intended: the width is stored per thread (t3code:preview-panel-width:${activeThreadKey} in ChatView.tsx). Also, I couldn't find a "share the right panel width across threads" setting in Settings.

So this is a feature request rather than a bug: could the right panel remember one width across threads, or offer a setting for it? I mostly want one width everywhere, and I resize it in every thread right now. Happy to retitle the issue if that helps.

svenrabe avatar Nov 07 '26 23:11 svenrabe