Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
643f36f
fix(V-90/batch1): first-run Setup/Unlock uses the .pmv file as source…
tonmoycoder Nov 7, 2026
52866f1
docs(V-90): record PR #4 and CI 42413851086 pass/pass; close batch 1
tonmoycoder Nov 7, 2026
b99fe78
fix(V-90/batch2): guaranteed 36px status-bar inset, horizontal oversc…
tonmoycoder Nov 7, 2026
a0fc6ec
docs(V-90): record batch 2 CI success and close the batch
tonmoycoder Nov 7, 2026
09d5747
fix(V-90/batch3): strict RFC-1918 peers, real Rust LAN IPv4, late-Wi-…
tonmoycoder Nov 8, 2026
8945e62
docs(V-90): record batch 3 CI success (incl. Windows Rust build) and …
tonmoycoder Nov 8, 2026
0e616c7
fix(V-90/batch4): resilient release check never claims false offline;…
tonmoycoder Nov 8, 2026
a3fa6cb
docs(V-90): record batch 4 CI success and close the batch
tonmoycoder Nov 8, 2026
249f116
V-94 batch 5: strict otpauth Base32 secrets, dark adaptive icon, real…
tonmoycoder Nov 8, 2026
da78cf8
V-94 batch 5 close-out: ledger CI evidence
tonmoycoder Nov 8, 2026
df72f73
V-95 batch 6: modal footer honours Android bottom inset, 360x800/1440…
tonmoycoder Nov 8, 2026
f21cf4e
V-95 batch 6 close-out: ledger CI evidence
tonmoycoder Nov 8, 2026
5bc4b42
V-95b: harden B-28 against CI KDF flake (per-viewport context, poll r…
tonmoycoder Nov 8, 2026
fb692d7
V-95 batch 6 final close-out: ledger CI evidence for both green runs
tonmoycoder Nov 8, 2026
6a564a6
V-96 batch 7: CI enforces tsc --noEmit, release verifies SHA256SUMS.t…
tonmoycoder Nov 9, 2026
2280e33
V-96 final close-out: correct stale runbook facts, add PR#4 local+mer…
tonmoycoder Nov 9, 2026
071e407
fix(android): eliminate duplicate usesCleartextTraffic attribute in m…
tonmoycoder Nov 9, 2026
7a16990
fix(release): streamline asset upload using native clobber and releas…
tonmoycoder Nov 9, 2026
133a016
fix(release): correct jq query expression for release assets verifica…
tonmoycoder Nov 9, 2026
b3d577a
docs(release): record V-98 release completion, 5 canonical assets, an…
tonmoycoder Nov 9, 2026
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
- name: Install Frontend Dependencies
run: npm ci

# V-96: `npm run build` is a Vite transpile, NOT a type check. A type
# error could reach main even though the local gate `npx tsc --noEmit`
# would have caught it. CI now enforces the same contract.
- name: Verify TypeScript (no emit)
run: npx tsc --noEmit

- name: Verify TypeScript & Frontend Build
run: npm run build

Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ jobs:
printf '%s %s\n' "$hash" "$file" >> SHA256SUMS.txt
done <<< "$files"
cat SHA256SUMS.txt
# V-96: verify the manifest BEFORE uploading. A truncated or
# corrupt SHA256SUMS.txt must fail the release instead of shipping
# to users who run `sha256sum -c` after download.
sha256sum -c SHA256SUMS.txt

- name: Create or Update GitHub Release & Upload Assets
env:
Expand Down Expand Up @@ -370,18 +374,12 @@ jobs:
[ -f "$file" ] || continue
filename=$(basename "$file")
echo "Uploading $filename..."
asset_id=$(gh api "repos/${{ github.repository }}/releases/tags/$TAG/assets" \
--jq ".[] | select(.name==\"$filename\") | .id" 2>/dev/null || true)
if [ -n "$asset_id" ]; then
gh api -X DELETE "repos/${{ github.repository }}/releases/assets/$asset_id" >/dev/null
sleep 1
fi
# No `|| true`: a failed upload must fail the release.
gh release upload "$TAG" "$file" --clobber
done

echo "Verifying the published asset contract..."
names=$(gh api "repos/${{ github.repository }}/releases/tags/$TAG/assets" --jq '.[].name')
names=$(gh release view "$TAG" --json assets --jq '.assets[].name')
for required in \
"VaultZero-Windows-x64-Setup.exe" \
"VaultZero-Windows-x64-Portable.exe" \
Expand Down
164 changes: 164 additions & 0 deletions checklistprogress.md

Large diffs are not rendered by default.

630 changes: 630 additions & 0 deletions checkpoint.md

Large diffs are not rendered by default.

50 changes: 47 additions & 3 deletions docs/RELEASE-RUNBOOK.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# VaultZero — সাইনড Beta প্রকাশের রানবুক

> **এই ডকumentটি কেন আছে:** "ডাউনলোডে পুরনো ভার্সন আসছে" অভিযোগের মূল কারণ সোর্স কোডের বাগ নয়, **প্রকাশনা**। ২০২৬-১১-০৭ পর্যবেক্ষণে live latest release `v2.5.2`, প্রকাশিত `2026-11-02T01:18:40Z`, target `main`, ৯টি অ্যাসেট; অথচ সোর্সে V-85/V-86/V-87/V-88 পর্যন্ত কাজ হয়েছে। ফলে ব্যবহারকারী ৫ দিন পুরনো বিল্ড পাচ্ছেন। `scripts/check-live-release.mjs` এটাকেই `STALE` বলে ধরে এবং দেখায় যে ২টি canonical নাম অনুপস্থিত (`VaultZero-Windows-x64-Portable.exe`, `VaultZero-Windows-x64.msi`) → README-র ২টি লিংক 404।
> **এই ডকুমেন্টটি কেন আছে:** "ডাউনলোডে পুরনো ভার্সন আসছে" অভিযোগের মূল কারণ সোর্স কোডের বাগ নয়, **প্রকাশনা**। ২০২৬-১১-০৯ পর্যবেক্ষণে live latest release `v2.5.2`, প্রকাশিত `2026-11-02T01:18:40Z`, target `main`, `draft:false prerelease:false`, **১০টি অ্যাসেট**। ৫টি canonical নামই README-তে আছে এবং published — `node scripts/check-live-release.mjs` → EXIT 0, `RESULT: all 5 links resolve`। তবুও স্ক্রিপ্ট `STALE` দেখায়: release-এর তারিখ সোর্সের (V-90…V-96, PR #4) চেয়ে পুরনো, তাই ব্যবহারকারী পুরনো বিল্ডই ডাউনলোড করছেন। স্ক্রিপ্টের পুরনো স্ট্রিংগুলো (`Connected: 192.1`, `IP: tauri.localhost`, `v2.5.0` ফুটার, "Offline / Air-gapped network") বর্তমান সোর্সে নেই — সেগুলো ঐ পুরনো APK-র। সমাধান একটাই: **এই commit থেকে সাইনড Beta প্রকাশ**।
>
> **এখানে (sandbox-এ) প্রকাশ সম্ভব নয়:** ৪টি Android signing secret নেই, `gh secret list` → HTTP 403 (`Resource not accessible by integration`), `keytool`/`java` নেই, Windows runner নেই। নিচের ধাপগুলো মানুষ বা Antigravity-কে locally চালাতে হবে। কোনো fake/debug অ্যাসেট তৈরি করা যাবে না।
> **এখানে (sandbox-এ) প্রকাশ বা merge সম্ভব নয়:** ৪টি Android signing secret নেই, `gh secret list` → HTTP 403 (`Resource not accessible by integration`), `keytool`/`java` নেই, Windows runner নেই। নিচের ধাপগুলো মানুষ বা Antigravity-কে locally চালাতে হবে। কোনো fake/debug অ্যাসেট তৈরি করা যাবে না।

---

Expand Down Expand Up @@ -157,4 +157,48 @@ node scripts/check-live-release.mjs
- `docs/ANTIGRAVITY-BRIEF.md` একটি **historical** round-2 audit brief (পুরনো ব্রাঞ্চ `arena/79f3d1ba-vaultzero`, PR #1); release-এর জন্য এটা অনুসরণ করবেন না।
- এই ডকের বাইরের local-only কাজগুলোর জন্য আলাদা Antigravity prompt ব্যবহার করুন।

*সর্বশেষ যাচাই: ২০২৬-১১-০৭, branch `arena/317fbb3c-vaultzero`।*
---

## ৮. PR #4 / নতুন ক্যাম্পেইন — Antigravity-র local কাজ ও merge

> ২০২৬-১১-০৯: branch `arena/317fbb3c-vaultzero`, **PR #4** (`https://github.com/tonmoycoder/VaultZero/pull/4`) OPEN → `main`। ৭টি micro-batch V-90…V-96 শেষ; `gh pr checks 4` pass/pass; পূর্ণ Playwright ১৭৬/১৭৬; ৪৪টি harness সবুজ। Sandbox থেকে **কোনো merge, tag বা publish করা হয়নি** — নিচের local-only কাজগুলো শেষ করে Antigravity-কেই merge করতে হবে।

### ক) সোর্স sync ও gate পুনরায় চালান (local)

```bash
git fetch origin
git checkout arena/317fbb3c-vaultzero
git pull --ff-only
npm ci
npx tsc --noEmit
npm run verify
npx -y node@20 scripts/run-harness.mjs
npx playwright test
npm audit --audit-level=high
node scripts/check-live-release.mjs
gh pr checks 4
```

`cargo clippy --all-targets -- -D warnings` ও `cargo test` Windows CI-তেই সবুজ; local Rust toolchain না থাকলে বাধ্য করবেন না।

### খ) Physical-device যাচাই (sandbox-এ অসম্ভব)

- **Windows:** `VaultZero-Windows-x64-Setup.exe` / `.msi` / Portable.exe ইনস্টল → প্রথম ভল্ট তৈরি (`aA2525@`), Quick Unlock, `<2s` cold start পরিমাপ, NSIS header/sidebar artwork, অনলাইনে "Check for Updates"।
- **Android:** signed APK-তে status-bar clearance (header `y>=36`), gesture-nav bar-এ footer-এর তিনটি বাটন (`--safe-bottom` 24/48px), camera permission + real LAN P2P handshake + 120Hz jitter, adaptive icon-এর গাঢ় `#13182D` ব্যাকগ্রাউন্ড, `eng+ben` OCR বাংলা হাতের লেখায়।
- কোনোটি ফেল করলে **merge আটকান**; আগে fix করে নতুন commit + CI সবুজ করুন।

### গ) সাইনড Beta প্রকাশ (১–৬ নং ধাপ)

৪টি secret, `keytool`, `workflow_dispatch` tag `v2.5.2-beta.1`। Signed log-এ অবশ্যই `Restored the long-lived release signing keystore from GitHub Secrets.` দেখতে হবে; `Using consistent release keystore.` দেখলে **থামুন, publish নয়**। ৫/৫ অ্যাসেট + `sha256sum -c SHA256SUMS.txt` + `node scripts/check-live-release.mjs`-এ আর `STALE` না থাকলেই সফল।

### ঘ) Merge (সব local যাচাই সবুজ হওয়ার পর)

```bash
gh pr checks 4
gh pr view 4 --json state,mergeable,baseRefName,headRefName
gh pr merge 4 --merge
```

Auto-merge নয়; explicit PR নম্বর `4`। PR #1 (superseded) কখনোই merge/inspect করবেন না; PR #2 ও #3 আগেই MERGED।

*সর্বশেষ যাচাই: ২০২৬-১১-০৯, branch `arena/317fbb3c-vaultzero`, PR #4 OPEN (merge বাকি)।*
4 changes: 2 additions & 2 deletions scripts/check-live-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ console.log(`local HEAD: ${head}`);
// The user reported "downloads the old version". A release whose build
// predates the current source is exactly that, independently of asset names.
if (/^\d{4}-\d{2}-\d{2}/.test(published) && /^\S+ (\d{4}-\d{2}-\d{2})/.test(head)) {
const releaseDay = published.slice(0, 10);
const headDay = head.split(" ")[1].slice(0, 10);
const releaseDay = new Date(published).toISOString().slice(0, 10);
const headDay = new Date(head.split(" ")[1]).toISOString().slice(0, 10);
if (releaseDay < headDay) {
console.log(`STALE release ${tag} predates local source (${releaseDay} < ${headDay}); users download old code until a signed Beta is published.`);
}
Expand Down
31 changes: 16 additions & 15 deletions scripts/patch-android-manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,22 @@ if (additions.length) {
}

// Local LAN P2P uses plain HTTP; Android 9+ blocks cleartext by default.
if (!/android:usesCleartextTraffic="true"/.test(manifest)) {
if (/<application\b[^>]*>/.test(manifest)) {
// V-84: `tauri android init` emits a SELF-CLOSING <application ... />.
// Appending an attribute after the slash produced invalid XML
// (`<application ... / android:...>`) and broke the APK build. Preserve
// the original tag form instead of blindly string-concatenating.
manifest = manifest.replace(/<application\b[^>]*>/, (tag) => {
const selfClosing = /\/>$/.test(tag);
const attrs = tag.replace(/^<application\b/, "").replace(/\s*\/?>$/, "").trimEnd();
return `<application${attrs} android:usesCleartextTraffic="true"${selfClosing ? " />" : ">"}`;
});
} else {
console.error("[android-manifest] generated manifest has no <application> element — cannot enable LAN P2P.");
process.exit(1);
}
// Tauri's generated manifest includes `android:usesCleartextTraffic="${usesCleartextTraffic}"`.
// Replacing it prevents duplicate attribute errors in ManifestMerger2.
if (/android:usesCleartextTraffic="[^"]*"/.test(manifest)) {
manifest = manifest.replace(
/android:usesCleartextTraffic="[^"]*"/,
'android:usesCleartextTraffic="true"'
);
} else if (/<application\b[^>]*>/.test(manifest)) {
manifest = manifest.replace(/<application\b[^>]*>/, (tag) => {
const selfClosing = /\/>$/.test(tag);
const attrs = tag.replace(/^<application\b/, "").replace(/\s*\/?>$/, "").trimEnd();
return `<application${attrs} android:usesCleartextTraffic="true"${selfClosing ? " />" : ">"}`;
});
} else {
console.error("[android-manifest] generated manifest has no <application> element — cannot enable LAN P2P.");
process.exit(1);
}

writeFileSync(GENERATED, manifest, "utf8");
Expand Down
5 changes: 4 additions & 1 deletion src-tauri/icons/android/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
<!-- V-94: match the official dark navy emblem (src-tauri/icons/icon.png
corner pixel 19,24,45). The generic white default made adaptive
launchers show a white tile behind a dark logo. -->
<color name="ic_launcher_background">#13182D</color>
</resources>
8 changes: 8 additions & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ pub mod commands {
Ok(dir.join("local-vault.pmv").to_string_lossy().to_string())
}

/// Real LAN IPv4 for the P2P Host QR. Delegates to the P2P module so the
/// UDP-route trick and the RFC-1918 filter live next to the transport.
#[tauri::command]
pub fn lan_ipv4() -> Option<String> {
crate::p2p_lan::detect_lan_ipv4()
}

#[tauri::command]
pub fn has_vault_file(app: tauri::AppHandle) -> bool {
if let Ok(dir) = app.path().app_data_dir() {
Expand Down Expand Up @@ -883,6 +890,7 @@ pub fn run() {
commands::lock_vault,
commands::vault_file_path,
commands::has_vault_file,
commands::lan_ipv4,
commands::save_update_artifact,
commands::create_vault,
commands::unlock_vault,
Expand Down
32 changes: 32 additions & 0 deletions src-tauri/src/p2p_lan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,35 @@ impl P2PManager {
String::from_utf8(decrypted).map_err(|e| format!("Peer payload was not valid UTF-8: {}", e))
}
}

/// Returns this device's REAL private LAN IPv4 address, or `None` when no
/// usable local interface exists.
///
/// `UdpSocket::connect` on a UDP socket only selects the outbound route and
/// records the default peer — it sends NO packet, so this also works on an
/// air-gapped device. `window.location.hostname` cannot be used instead:
/// inside a Tauri WebView it is `tauri.localhost`, which another device on
/// the Wi-Fi can never reach.
pub fn detect_lan_ipv4() -> Option<String> {
let socket = std::net::UdpSocket::bind("0.0.0.0:0").ok()?;
socket.connect("8.8.8.8:80").ok()?;
let addr = socket.local_addr().ok()?;
let ip = match addr.ip() {
std::net::IpAddr::V4(v4) => v4,
std::net::IpAddr::V6(_) => return None,
};
let octets = ip.octets();
// Loopback, unspecified and link-local addresses are not LAN peers.
if octets[0] == 127 || octets[0] == 0 || (octets[0] == 169 && octets[1] == 254) {
return None;
}
// RFC-1918: 10/8, 172.16/12, 192.168/16. A public address is not a
// same-Wi-Fi endpoint and must not be advertised in the pairing QR.
let private = octets[0] == 10
|| (octets[0] == 172 && (16..=31).contains(&octets[1]))
|| (octets[0] == 192 && octets[1] == 168);
if !private {
return None;
}
Some(ip.to_string())
}
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"app": {
"withGlobalTauri": true,
"security": {
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' https://api.github.com https://github.com https://objects.githubusercontent.com; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'none'"
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' https://api.github.com https://github.com https://*.githubusercontent.com https://objects.githubusercontent.com ipc: http://ipc.localhost; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'none'"
},
"windows": [
{
"title": "VaultZero — 100% Offline Password Manager",
"title": "VaultZero \u2014 100% Offline Password Manager",
"width": 1200,
"height": 800,
"minWidth": 480,
Expand Down
10 changes: 8 additions & 2 deletions src/components/LockScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,16 @@ export default function LockScreen({
return "";
});

// V-90: an explicit user choice wins over the asynchronous native probe.
const manualModeRef = useRef(false);

useEffect(() => {
let mounted = true;
checkVaultConfiguredAsync().then((configured) => {
if (mounted && configured) {
setIsSetup(false);
// Both directions matter: a stale marker must send a fresh install
// BACK to Setup, not only a found .pmv file to Unlock.
if (mounted && !manualModeRef.current) {
setIsSetup(!configured);
}
});
return () => {
Expand Down Expand Up @@ -555,6 +560,7 @@ export default function LockScreen({
<button
type="button"
onClick={() => {
manualModeRef.current = true;
setIsSetup((v) => !v);
setError("");
}}
Expand Down
20 changes: 20 additions & 0 deletions src/components/UpdateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,26 @@ export default function UpdateModal({
</div>
)}

{/* V-93: the network IS reachable but release metadata could not be
read (rate limit / blocked WebView UA / malformed body). This is
NOT an air-gapped device, so the offline notice must not appear. */}
{statusState.status === "error" && (
<div className="rounded-[18px] border border-amber-500/25 bg-amber-500/10 p-3.5 text-left">
<div className="flex items-center gap-2 text-[10px] font-semibold text-amber-600 dark:text-amber-400">
<WarningCircle size={15} weight="duotone" className="shrink-0" />
<span>
{lang === "bn"
? "রিলিজ তথ্য পড়া যায়নি — তবে নেটওয়ার্ক চালু আছে"
: "Release information unavailable — the network is reachable"}
</span>
</div>
<p className="mt-1 text-[8.5px] leading-relaxed text-muted">
{statusState.message ||
(lang === "bn" ? "কিছুক্ষণ পরে আবার চেষ্টা করুন।" : "Please try again shortly.")}
</p>
</div>
)}

{/* State 3: Offline / Air-Gapped Notice */}
{statusState.status === "offline" && (
<div className="rounded-[18px] border border-amber-500/25 bg-amber-500/10 p-3.5 text-left">
Expand Down
7 changes: 5 additions & 2 deletions src/components/VaultHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,10 @@ export default function VaultHome({
{checkedIds.size === items.length && <Check size={10} weight="bold" />}
</button>
)}
<h2 className="font-display text-[13px] font-semibold tracking-[-0.01em] text-main">
{/* V-91: a long folder name used to wrap "All items" onto two lines
and push the badge/sort row out of alignment. One line, no
shrink, ellipsised at 70vw so it can never inflate the page. */}
<h2 className="min-w-0 max-w-[70vw] shrink-0 truncate whitespace-nowrap font-display text-[13px] font-semibold tracking-[-0.01em] text-main">
{heading}
</h2>
<span
Expand All @@ -1087,7 +1090,7 @@ export default function VaultHome({
overflows, which is the reported "stuck" horizontal scroll.
One nowrap, start-aligned, horizontally scrollable row keeps all
four controls on the same baseline at every width. */}
<div className="thin-scrollbar flex max-w-full flex-nowrap items-center justify-start gap-1 overflow-x-auto rounded-2xl border border-[var(--border-soft)] bg-[var(--glass-soft)] p-0.5 sm:justify-center sm:rounded-full">
<div className="no-scrollbar flex max-w-full touch-pan-x flex-nowrap items-center justify-start gap-1 overflow-x-auto overscroll-x-contain rounded-2xl border border-[var(--border-soft)] bg-[var(--glass-soft)] p-0.5 sm:justify-center sm:rounded-full">
{(
[
{ id: "recent", label: t(lang, "sortRecent") },
Expand Down
2 changes: 1 addition & 1 deletion src/components/captureModals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ export function OcrModal({
<div className="min-w-0 flex-1">
<div className="mb-1 flex justify-between text-[8px]"><span className="font-semibold text-main">Reading text locally</span><span className="font-mono text-accent">{progress}%</span></div>
<div className="h-1.5 overflow-hidden rounded-full bg-[var(--border-ink)]"><div className="h-full rounded-full transition-[width] duration-150" style={{ width: `${progress}%`, background: "linear-gradient(90deg, var(--accent-deep), var(--accent))" }} /></div>
<p className="mt-1 text-[7.5px] text-faint">{fileName} · on-device vision model</p>
<p className="mt-1 text-[7.5px] text-faint">{fileName} · on-device offline OCR (Tesseract)</p>
</div>
</div>
</div>
Expand Down
Loading
Loading