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
2 changes: 2 additions & 0 deletions .claude/skills/resolving-issues/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ Fresh agent per issue, scoped to one issue + master branch ref. Steps:

1. Read the issue. Decide if more context needed.
2. **Research (optional, parallel OK):** spawn research subagents for codebase grep, related-file reads, spec lookups. Synthesize before coding. Re-grep cited line numbers / LOC counts at HEAD before working from issue-body literal positions — they drift fast across refactors and may be off by hundreds of lines after a recent file move.

**Verify the audit's claimed mechanism, not just its line numbers.** Audits sometimes prescribe a fix that depends on a stated mechanism — "log via `tracing::warn!`", "the rebuild Effect recovers dropped inserts", "the existing CSP test would catch this". That stated mechanism may (a) violate a module-local constraint (e.g. a privacy contract in the module doc forbidding `tracing::*`), or (b) describe code that doesn't actually exist as cited (e.g. a "rebuild Effect" referenced in a doc-comment but not present in any `app.rs` Effect — the actual recovery path is a different shape with the same fragility). **Pre-flight read** the cited file's module-doc + the cited recovery code at HEAD before dispatching. If either check fails, the issue is an **ambiguous-fix-path** (see step 6 of the Core Loop): coordinator-skip without close, note in run-end Lessons Learned, leave for a future session with fresh eyes. Saves a wasted dispatch + a likely rejected commit. Examples surfaced this way: `crates/client/src/search/handle.rs` module-doc forbids `tracing::*` (privacy contract) — kills audit's "log the drop" prescription; the "rebuild Effect" cited in `insert`'s doc-comment is itself misleading (only an event-loop subscription exists, sharing the same `do_send` fragility).
3. **Complexity gate — automated brainstorm + plan when warranted:**
- **Trigger any of:** issue spans > 1 crate, fix touches state machine / wire format / migration paths, ≥ 2 reasonable approaches exist, root cause not obvious from issue text, fix likely > 5 files OR > 200 LOC, "it depends" question on scope.
- **Skip when:** issue is a one-liner / config swap / typo / clearly mechanical (single rg-pattern site) / has explicit "Suggested fix" the implementer can follow verbatim.
Expand Down
209 changes: 0 additions & 209 deletions PLAN.md

This file was deleted.

8 changes: 6 additions & 2 deletions crates/web/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "Willow",
"short_name": "Willow",
"description": "P2P encrypted chat",
"id": "/",
"scope": "/",
"start_url": "/",
"display": "standalone",
"background_color": "#1a1a1e",
Expand All @@ -10,12 +12,14 @@
{
"src": "/icon-192.svg",
"sizes": "192x192",
"type": "image/svg+xml"
"type": "image/svg+xml",
"purpose": "any maskable"
},
{
"src": "/icon-512.svg",
"sizes": "512x512",
"type": "image/svg+xml"
"type": "image/svg+xml",
"purpose": "any maskable"
}
]
}
6 changes: 4 additions & 2 deletions crates/web/src/components/member_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,13 @@ pub fn MemberList(
pid.chars().take(6).collect();
let name = format!("side-{short}");
wasm_bindgen_futures::spawn_local(async move {
let _ = h.create_ephemeral_channel(
if let Err(e) = h.create_ephemeral_channel(
&name,
willow_state::EphemeralKind::Channel,
willow_state::DEFAULT_CHANNEL_THRESHOLD_MS,
).await;
).await {
tracing::warn!(?e, "create_ephemeral_channel failed");
}
});
}
>
Expand Down
17 changes: 13 additions & 4 deletions crates/web/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,19 @@ fn main() {
}
}

// Register the service worker for PWA support.
let _ = js_sys::eval(
"if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js').catch(function() {}); }",
);
// Register the service worker for PWA support. Logs failures (HTTPS
// misconfiguration, MIME mismatch, parse errors, scope violations) so
// they surface instead of being silently swallowed (issue #606).
if let Some(window) = web_sys::window() {
let sw_container = window.navigator().service_worker();
let promise = sw_container.register("/sw.js");
wasm_bindgen_futures::spawn_local(async move {
if let Err(e) = wasm_bindgen_futures::JsFuture::from(promise).await {
let msg = e.as_string().unwrap_or_else(|| format!("{e:?}"));
tracing::warn!("service worker registration failed: {msg}");
}
});
}

// Wire navigator.serviceWorker.onmessage so pushes forwarded by the
// service worker (focused-client path) reach the in-app Notifier.
Expand Down