Skip to content

Commit 015f447

Browse files
committed
fix(desktop): keep build branding until a thread title arrives
1 parent 2bc3c88 commit 015f447

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎apps/desktop/src/window/DesktopWindow.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ describe("DesktopWindow", () => {
645645
);
646646
});
647647

648-
it.effect("keeps application titles on load and falls back for empty or external titles", () =>
648+
it.effect("keeps thread titles on load and keeps branding for bootstrap or external titles", () =>
649649
Effect.gen(function* () {
650650
const fakeWindow = makeFakeBrowserWindow();
651651
const createCount = yield* Ref.make(0);
@@ -670,7 +670,7 @@ describe("DesktopWindow", () => {
670670
vi.mocked(fakeWindow.window.webContents.getTitle).mockReturnValue(title);
671671
finishLoad();
672672
assert.equal(vi.mocked(fakeWindow.window.setTitle).mock.lastCall?.[0], title);
673-
updateTitle(event, " ");
673+
updateTitle(event, "T3 Code (Alpha)");
674674
assert.equal(
675675
vi.mocked(fakeWindow.window.setTitle).mock.lastCall?.[0],
676676
environment.displayName,

‎apps/desktop/src/window/DesktopWindow.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,9 @@ export const make = Effect.gen(function* () {
702702
applicationUrl,
703703
navigationUrl: window.webContents.getURL(),
704704
});
705-
window.setTitle(trusted && title.trim() ? title : environment.displayName);
705+
// Only thread context ("project / thread") replaces desktop branding; the
706+
// page bootstrap title and app-only titles carry the wrong build stage.
707+
window.setTitle(trusted && title.includes(" / ") ? title : environment.displayName);
706708
};
707709
window.on("page-title-updated", (event, title) => {
708710
event.preventDefault();

0 commit comments

Comments
 (0)