Skip to content

feat: reflect active project/thread in the window title#3800

Open
pixelmund wants to merge 2 commits into
pingdotgg:mainfrom
uXcrew-development:feat/workspace-window-title
Open

feat: reflect active project/thread in the window title#3800
pixelmund wants to merge 2 commits into
pingdotgg:mainfrom
uXcrew-development:feat/workspace-window-title

Conversation

@pixelmund

@pixelmund pixelmund commented Jul 8, 2026

Copy link
Copy Markdown

Mirror the renderer's document.title onto the native window title so external window-title scanners and time trackers can see the active workspace. The title is formatted as "project – thread — app name", falling back to the plain app name when no project/thread context is active.

  • add formatWorkspaceDocumentTitle() branding helper + unit tests
  • derive document.title from the active thread/project route in DocumentTitleSync
  • mirror the page title onto the Electron window via page-title-updated

What Changed

Adds workspace context (active project + thread) to the window/document title:

  • New formatWorkspaceDocumentTitle() helper in branding.logic.ts that builds "project – thread — app name", includes whichever of project/thread is present, ignores blank values, and falls back to the plain app name when neither is set. Covered by unit tests.
  • DocumentTitleSync (__root.tsx) now reads the active thread/project from the route (non-strict useParams, since it renders above the matched route) and feeds them into the helper to set document.title.
  • On desktop, page-title-updated now mirrors the renderer's document.title onto the native window title instead of hard-coding the app name, so the OS window title reflects the active workspace.

Why

External tooling that reads the OS window title — time trackers, window-title scanners — currently only ever sees the static app name, so it can't tell which project or thread is active. Surfacing the active workspace in the title lets that tooling attribute time/activity to the right project and thread without any new API. The renderer already knows the project/thread from the route, so the title is derived there and simply mirrored onto the native window; the pure formatting logic is isolated in branding.logic.ts so it's unit-testable and the fallback behavior is explicit.

UI Changes

No in-app UI changes. The only visible effect is the window/tab title text, e.g.:

  • Before: T3 Code
  • After (thread open): acme-web – Fix login redirect — T3 Code
  • After (no project/thread): T3 Code (unchanged fallback)

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (title text examples above; no visual UI beyond the window title)
  • I included a video for animation/interaction changes (n/a)

Note

Low Risk
Title-only UX changes with no auth, data, or API surface impact; desktop title sync is a small behavioral change in window chrome.

Overview
Window and tab titles now include the active workspace so external tools (time trackers, window scanners) can see project/thread context instead of only the static app name.

Adds formatWorkspaceDocumentTitle() to build titles like project – thread — app name, with partial context and blank-value handling; unit tests cover the formatting rules.

DocumentTitleSync resolves the current thread or composer draft from route params and entity state, then sets document.title via that helper (draft routes still show the project name).

On desktop, Electron no longer forces environment.displayName on page-title-updated and did-finish-load; it mirrors the renderer title with the same app-name fallback when empty.

Reviewed by Cursor Bugbot for commit 156b6e7. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Reflect active project and thread in the desktop window title

  • Adds formatWorkspaceDocumentTitle in branding.logic.ts to build a title like project – thread — app from available context, falling back to the app name alone.
  • Updates DocumentTitleSync in __root.tsx to resolve the active project and thread and set document.title accordingly.
  • Updates DesktopWindow.ts to mirror document.title onto the native window title via the page-title-updated event, falling back to the app display name when no title is set.

Macroscope summarized 156b6e7.

Mirror the renderer's document.title onto the native window title so external
window-title scanners and time trackers can see the active workspace. The title
is formatted as "project – thread — app name", falling back to the plain app
name when no project/thread context is active.

- add formatWorkspaceDocumentTitle() branding helper + unit tests
- derive document.title from the active thread/project route in DocumentTitleSync
- mirror the page title onto the Electron window via page-title-updated

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Run ID: 5606d5a1-1a74-41dd-94b4-2ca27c5378e6

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 8, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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 for commit 5b078c1. Configure here.

Comment thread apps/web/src/routes/__root.tsx
Comment thread apps/desktop/src/window/DesktopWindow.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR adds a UI-only feature to display the active project/thread in the window title. The changes are self-contained, include comprehensive unit tests, and don't affect runtime behavior beyond title formatting.

You can customize Macroscope's approvability policy. Learn more.

Addresses two review findings:

- DocumentTitleSync only resolved server threads (environmentId + threadId),
  so on a draft route the title fell back to the plain app name. Use
  resolveThreadRouteTarget to also resolve the draft's project, so a new,
  unsaved chat still surfaces its active project in the window title.
- The desktop did-finish-load handler unconditionally reset the native window
  title to the app name, reverting the workspace title on every (re)load.
  Re-apply the renderer's current document.title instead, via the shared
  applyWorkspaceTitle helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant