Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Show independent session and weekly usage for native saved Claude Code accounts, with account-scoped OAuth renewal and safe authentication warnings.
- Offer Refresh login beside Switch only for Claude and Codex accounts that need sign-in. Repair the selected saved login without switching to another account.
- Use expanded, collapsible Claude and Codex account sections with Add account below the rows; keep the floating bar's usage footprint when authentication expires.
- Let the tray panel be moved and resized again: drag the strip along its top to move it (the spot is remembered; double-click returns it next to the tray), resize from any edge or corner, and stop it from closing when a resize starts on its outer frame. Its remembered size is now kept in logical pixels, so it fits monitors with different scaling (a size saved by an earlier version is reset to the automatic size once).

## [Windows] 0.70.0 - 2026-10-03

Expand Down
15 changes: 11 additions & 4 deletions apps/desktop-tauri/src-tauri/src/commands/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ pub fn close_settings_window(
crate::shell::settings_window::dismiss(&app, &window)
}

/// Persist a user-chosen size for the "Pop Out Dashboard" flyout window.
/// Only the size is stored (via a size-only `StoredSize` entry — no
/// fabricated `x`/`y`); the flyout is always re-anchored above the tray on
/// open. The frontend calls this on genuine user drag-resizes, not on its own
/// Persist a user-chosen size (logical px) for the "Pop Out Dashboard" flyout
/// window. Only the size is stored (via a size-only `StoredSize` entry — no
/// fabricated `x`/`y`); the position is tracked separately, only once the
/// user drags the flyout. The frontend calls this on genuine user drag-resizes, not on its own
/// auto-fit resizes, so auto-fit sizes never freeze the panel.
#[tauri::command]
pub fn set_flyout_size(width: f64, height: f64) -> Result<(), String> {
Expand All @@ -129,6 +129,13 @@ pub fn set_flyout_size(width: f64, height: f64) -> Result<(), String> {
Ok(())
}

/// Forget where the user dragged the flyout and anchor it to the tray again
/// (double-click on the panel's move handle).
#[tauri::command]
pub fn reset_flyout_position(app: tauri::AppHandle) -> Result<(), String> {
crate::shell::flyout_window::reset_position(&app)
}

/// Return the remembered flyout size, if the user has manually resized it.
/// The frontend uses this to decide whether to auto-fit (no stored size) or
/// honor the user's size (stored) on open. Transparently migrates a
Expand Down
22 changes: 17 additions & 5 deletions apps/desktop-tauri/src-tauri/src/geometry_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
//! Remembers position (and size where applicable) for detached user surfaces:
//! PopOut and Settings.
//!
//! The flyout window stays computed from the tray anchor/work-area because it
//! is a temporary anchored panel, not a user-movable standalone window — but
//! its SIZE is remembered via the size-only [`StoredSize`] entries below, kept
//! separate from [`StoredGeometry`] so the flyout's persisted size can never
//! carry fabricated `x`/`y` coordinates.
//! The flyout window is anchored to the tray until the user drags it; only
//! then is its position stored (`shell::flyout_placement`). Its SIZE is
//! remembered via the size-only [`StoredSize`] entries below, kept separate
//! from [`StoredGeometry`] so a resize of a tray-anchored flyout never carries
//! fabricated `x`/`y` coordinates.

use std::fs;
use std::path::PathBuf;
Expand Down Expand Up @@ -154,6 +154,18 @@ pub fn save_entry(key: &str, geometry: StoredGeometry) {
}
}

/// Forget the geometry stored under an arbitrary key. No-op (and no write)
/// when nothing is stored there.
pub fn remove_entry(key: &str) {
let mut file = load_file();
if file.entries.remove(key).is_none() {
return;
}
if let Err(err) = save_file(&file) {
tracing::warn!(target: "codexbar::geometry", %err, "failed to persist geometry");
}
}

/// Legacy key the flyout size was stored under before it became a dedicated
/// window: the old `SurfaceMode::TrayPanel` shared-window geometry entry.
const LEGACY_FLYOUT_SIZE_KEY: &str = "trayPanel";
Expand Down
1 change: 1 addition & 0 deletions apps/desktop-tauri/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ fn main() {
commands::close_settings_window,
commands::set_flyout_size,
commands::flyout_stored_size,
commands::reset_flyout_position,
commands::get_current_surface_state,
commands::refresh_providers,
commands::refresh_providers_if_stale,
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop-tauri/src-tauri/src/shell/activation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub fn restore_minimized_without_activation(window: &impl raw_window_handle::Has
pub fn restore_minimized_without_activation(_window: &impl raw_window_handle::HasWindowHandle) {}

#[cfg(windows)]
fn root_hwnd(window: &impl raw_window_handle::HasWindowHandle) -> Option<isize> {
pub(super) fn root_hwnd(window: &impl raw_window_handle::HasWindowHandle) -> Option<isize> {
const GA_ROOT: u32 = 2;
let handle = window.window_handle().ok()?;
let raw_window_handle::RawWindowHandle::Win32(h) = handle.as_raw() else {
Expand Down
Loading
Loading