You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opacity: faded page content now dims toward a black backdrop (fv-dimmed
class) instead of washing out to white — CSS opacity blends toward the
backdrop, and under the layered window's uniform alpha only a black
backdrop reads as desktop showing through.
Security: strict CSP for app pages (landing script moved to src/main.js),
IPC fallback capture validates Tauri internals shape, window titles strip
control characters, startup click-through recovery logs failures.
Bugs: bookmark/hotkey commands return bool so JS can distinguish success
from IPC failure (local bookmark state no longer diverges); hotkey resume
retries once before giving up; urls_match compares userinfo.
Performance: media MutationObservers debounced to one full scan per 150ms;
title/URL fallback polls 2s/3s → 10s with pushState/replaceState/hashchange
hooks and title-observer re-attach.
UI/UX: landing page restyled to the strip's warm-orange/dark-gray language;
WCAG contrast bumps; focus-visible coverage for recent items, settings
sliders, context menu; settings sliders mirror the strip slider; radius and
shadow tokens; popup mutual exclusion includes the volume popup; URL bar
selection/caret styling, select-all-on-click, text-height highlight.
Maintainability: AppConfig gains config_version for future migrations;
AGENTS.md/README/designdoc updated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ cd src-tauri && cargo test # Run unit tests
34
34
```
35
35
floatview/
36
36
├── src/
37
-
│ └── index.html # Landing page (URL input)
37
+
│ ├── index.html # Landing page (URL input)
38
+
│ └── main.js # Landing page logic (external so the CSP can stay strict)
38
39
├── src-tauri/
39
40
│ ├── src/
40
41
│ │ ├── main.rs # Binary shim; just calls `floatview::run()`
@@ -165,6 +166,7 @@ This ensures that:
165
166
166
167
```rust
167
168
pubstructAppConfig {
169
+
pubconfig_version:u32, // schema version; bump on rename/restructure, NOT additions
168
170
pubwindow:WindowConfig, // x, y, width, height, monitor, always_on_top, opacity, locked
169
171
publast_url:Option<String>,
170
172
pubrecent_urls:Option<Vec<String>>,
@@ -177,6 +179,8 @@ pub struct AppConfig {
177
179
}
178
180
```
179
181
182
+
New fields only need `#[serde(default)]`. If you rename, retype, or restructure a field, bump `CONFIG_VERSION` in `config.rs` and branch on the stored `config_version` during load so old configs migrate instead of silently resetting.
183
+
180
184
### Tray Menu Dynamic Updates
181
185
182
186
The tray uses `CheckMenuItem` for **Always on Top** and **Click-Through Mode**, with check marks that mirror the current state, and a conditional **Install Update vX.Y.Z** item that's disabled until an update is available.
@@ -273,10 +277,16 @@ Key injection.js features:
273
277
274
278
17.**Opacity clamping** -- Always go through `config::clamp_opacity`; it snaps near-opaque to 1.0 (lets the Windows backend drop `WS_EX_LAYERED`) and rejects non-finite inputs that would otherwise poison the saved config.
275
279
276
-
18.**Title truncation** -- `set_window_title` calls `truncate_title`, which respects UTF-8 char boundaries. Do NOT revert to `&title[..N]` slicing; it panics on multi-byte codepoints that any page can craft into a title.
280
+
17b. **Opacity dim backdrop** -- Below full opacity, page content is faded with CSS (`--fv-content-opacity`) while the window alpha floors at `WINDOW_ALPHA_FLOOR`. While faded, `applyContentOpacity` puts an `fv-dimmed` class on `<html>` that forces a **black** html/body backdrop: CSS opacity blends content toward the backdrop, and under the layered window's uniform alpha a black backdrop reads as "desktop showing through" whereas the default white backdrop washes the page out to milky white. Don't remove the class toggle when touching the opacity path.
281
+
282
+
17c. **Unit-returning commands look like failures in JS** -- The JS `invoke()` wrapper returns `null` on IPC failure, and Tauri serializes `Result<(), _>` success as `null` too. Commands whose callers need to distinguish success (bookmarks, pause/resume hotkeys) return `Ok(true)` instead of `Ok(())`. Follow that pattern for new commands when the JS side gates state changes on success.
283
+
284
+
18.**Title truncation** -- `set_window_title` calls `truncate_title`, which strips control characters (page-supplied titles can embed newlines/NUL to garble or spoof the title bar) and respects UTF-8 char boundaries. Do NOT revert to `&title[..N]` slicing; it panics on multi-byte codepoints that any page can craft into a title.
277
285
278
286
19.**Capabilities** -- The `global-shortcut` plugin's JS register/unregister permissions are NOT granted. Hotkey management is Rust-only; don't add those permissions without a matching JS feature.
279
287
288
+
20.**CSP** -- `tauri.conf.json` sets a strict CSP that applies to the app's own pages (the landing page) only — external sites bring their own. It allows `script-src 'self'` and no inline scripts, which is why the landing page logic lives in `src/main.js` instead of an inline `<script>`. Keep it that way; Tauri appends its own nonces for the scripts it injects.
289
+
280
290
## Testing
281
291
282
292
Run unit tests in `src-tauri/` (via `cargo test`). Test manually:
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,6 +250,8 @@ Configuration files are stored separately and not removed by default:
250
250
251
251
This program will not transfer any information to other networked systems unless specifically requested by the user. The only automated network request is the optional **Check for Updates** feature in Settings, which queries the [GitHub Releases API](https://github.com/davidtorcivia/floatview/releases) to check for new versions. No personal data, telemetry, or usage statistics are collected or transmitted.
252
252
253
+
Note that, like most desktop browsers, FloatView stores its settings — including bookmarks, recent URLs, and the last visited page — as plain-text JSON in your local app-data folder. Anyone with access to your user account (or disk) can read that file, so treat shared machines accordingly. **Clear Recent** / **Clear Bookmarks** in Settings remove those lists, and **Clear Site Data** wipes the webview's cookies and storage.
0 commit comments