Skip to content

Commit 8dd9937

Browse files
fix(ui): make thread names white, sync browser webview bounds on layout changes
1 parent cf2d7c9 commit 8dd9937

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

crates/tauri-app/frontend/src/components/browser/BrowserPanel.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,20 @@ export function BrowserPanel(props: BrowserPanelProps) {
3232
).catch(() => {});
3333
}
3434

35-
// Observe viewport resizes
35+
// Keep bounds in sync — ResizeObserver + polling fallback
3636
onMount(() => {
3737
const ro = new ResizeObserver(() => updateBounds());
3838
if (viewportRef) ro.observe(viewportRef);
3939

40-
// Also update on scroll/resize of the window
4140
window.addEventListener("resize", updateBounds);
4241

42+
// Poll every 200ms as fallback for layout changes (sidebar resize, pane drag, etc.)
43+
const interval = setInterval(updateBounds, 200);
44+
4345
onCleanup(() => {
4446
ro.disconnect();
4547
window.removeEventListener("resize", updateBounds);
48+
clearInterval(interval);
4649
// Hide webview when panel unmounts (thread switch)
4750
ipc.browserHide(props.threadId).catch(() => {});
4851
});

crates/tauri-app/frontend/src/components/sidebar/ThreadItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ if (!document.getElementById("thread-item-styles")) {
134134
padding: 5px 12px; margin: 1px 0;
135135
border-radius: var(--radius-sm); cursor: pointer;
136136
transition: background 0.15s, color 0.15s;
137-
font-size: 13px; color: var(--text-secondary);
137+
font-size: 13px; color: var(--text);
138138
touch-action: none;
139139
position: relative;
140140
}

crates/tauri-app/frontend/src/components/tabs/TabBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if (!document.getElementById("tab-bar-styles")) {
204204
padding: 6px 12px;
205205
font-size: 12px;
206206
font-weight: 500;
207-
color: var(--text-tertiary);
207+
color: var(--text-secondary);
208208
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
209209
cursor: grab;
210210
transition: background 0.12s, color 0.12s, opacity 0.15s;

0 commit comments

Comments
 (0)