Repository navigation
Sidebar: wrap thread titles at narrow widths, preserve child model tags, and wire up threadTitleInstructions
#21177
cornishandy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When running T3 Code (
0.1.1-nightly.20261018.3302, commitd0918f1659f4) side-by-side with an editor or browser on a laptop screen, the thread sidebar has three friction points that work against a narrow layout:Sidebar width is clamped at
208pxminimum and every thread title uses single-linetruncate.apps/web), the sidebar width clamp floors at208px(default256px), and thread titles across card rows, slim rows, draft rows, search results, and legacy project trees apply Tailwind'struncate(white-space: nowrap; overflow: hidden; text-overflow: ellipsis) alongside fixed row heights (h-[4.875rem]on cards,h-9on slim rows).208px, only ~20–24 characters of a thread title are visible before...cuts off the distinguishing words at the end of the title.Generated and child/subagent title limits don't match narrow-sidebar budgets (and cut off trailing model badges).
packages/provider-core/src/server/textGenerationPrompts.ts,INITIAL_THREAD_TITLE_PROMPTandregenerateThreadTitlePromptask for3-8 words, fewer than 40 characters, butsanitizeThreadTitleinpackages/provider-core/src/server/textGeneration.tssetsMAX_THREAD_TITLE_CHARS = 120and slices with raw UTF-16.slice(0, 117)(which can also split surrogate pairs).subagentThreadTitle(packages/provider-core/src/server/subagentProjection.ts) slices at72chars (detail.slice(0, 69) + "...") and MCP'sthreadTitle(apps/server/src/mcp/toolkits/orchestrator/shared.ts) slices at80chars. When an orchestrator names a delegated review or build with the model/effort at the end—e.g.Final Review Gate: Verify OAuth PKCE callback, token refresh, and session expiry (Model xhigh)(94 chars)—both the 72-char and 80-char slices cut off the trailing(Model xhigh)badge while keeping the verbose middle description.threadTitleInstructionsexists intextGenerationPrompts.tsbut isn't wired up.threadTitlePromptSuffix(input)inpackages/provider-core/src/server/textGenerationPrompts.tsalready readspolicyInstruction(input.policy?.threadTitleInstructions).fromRunner(...).generateThreadTitle(packages/provider-core/src/server/textGenerationOperations.ts) andThreadTitleRegenerationService(apps/server/src/orchestration-v2/ThreadTitleRegenerationService.ts) don't forwardpolicy, andServerSettingsexposesbranchNameInstructions,reviewGuideInstructions, andsourceControlWritingStyle.customInstructions, but nothreadTitleInstructions.Proposal
Allow multi-line wrapped thread titles in the sidebar and a narrower optional minimum width (e.g.
140pxwhile still respecting the measured titlebar button cluster).truncate+ fixed row height (h-[4.875rem]/h-9) withmin-h-[4.875rem] h-auto(cards) andmin-h-9 h-auto py-1.5(slim rows) +overflow-wrap: anywherelets titles wrap cleanly onto multiple lines, with rows expanding to fit in a narrow140px–190pxsidebar.Word-boundary, Unicode-safe truncation and tag-preserving compaction for child/subagent titles.
sanitizeThreadTitle, tighten the fallback ceiling to match the prompt budget (e.g.40characters, with a36-character prompt target) and trim at a word boundary (using code-point/grapheme iteration rather than raw UTF-16.slice()so surrogate pairs are never split).subagentThreadTitleand MCPthreadTitle, if a child title ends with a short parenthetical badge like(GPT-6.1-Sol)or(Claude Opus 5.5), preserve the trailing(...)suffix, compact verboseRole: Subjectprefixes when needed so the subject after:stays distinct, and word-trim before the badge (e.g.Review: OAuth PKCE... (GPT-6.1-Sol)).Wire
threadTitleInstructionsthroughServerSettings->ThreadTitleRegenerationService->fromRunner(...).generateThreadTitle->buildThreadTitlePrompt.threadTitlePromptSuffixalready supportsinput.policy?.threadTitleInstructions, exposing aThread title instructionsfield in Settings (next to the Text generation model selector or alongsidebranchNameInstructions/reviewGuideInstructions) would let users specify their own naming style (e.g. telegraphic noun phrases,<28 chars,Scope: Topicprefixes, or casing rules).What I'm running locally
On
0.1.1-nightly.20261018.3302(d0918f1659f4), I patched my localapp.asar(main-*.js,main-*.css,_chat-*.js, andbinCli-*.mjs) to removetruncateon sidebar row titles, switch card/slim rows tomin-height+height: auto, lower the sidebar width floor from208to140(while keepingMath.max(140, Math.ceil(e))for the titlebar measurement), tighten the title prompt to2-5 words, fewer than 36 characterswith a 40-char word-boundary sanitizer, and compact subagent/child titles to<= 42chars while preserving trailing(Model)tags and distinct subjects. In a ~160px sidebar, wrapped rows expand cleanly to fit without single-linetext-overflow: ellipsisclipping.All reactions