Skip to content

fix(ios): reuse already-downloaded GitHub vault + Clear GitHub cache#162

Merged
oratis merged 1 commit into
mainfrom
ux/ios-vault-dedupe-cache
Jun 14, 2026
Merged

fix(ios): reuse already-downloaded GitHub vault + Clear GitHub cache#162
oratis merged 1 commit into
mainfrom
ux/ios-vault-dedupe-cache

Conversation

@oratis

@oratis oratis commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Item 4/4 — the iOS gaps (the desktop already reuses a cached vault).

Dedupe re-open

Opening a repo that's already materialized now opens the local copy instantly instead of re-downloading the whole zipball — "Refresh from GitHub" is how you pull the latest. Mirrors the desktop's cached-vault behaviour. Guarded so the refresh full-reset fallback (which must re-download) is unaffected.

Clear GitHub cache

Downloaded vaults accumulate under Application Support with no way to reclaim space. Settings now shows the total size and a "Clear GitHub cache" action that removes every downloaded vault except the open one, plus the transient asset cache, then prunes dead vault-switcher entries. Size computation + clearing run off the main actor.

  • GitHubService: downloadedVaults() / clearCaches(keeping:) / directorySize() (all nonisolated).
  • VaultStore.forgetMissingVaults().
  • EN + 中文 strings.

Verify

App simulator build ✓.

This completes the 4-item GitHub-vault UX pass (data-loss guards ×2, visual distinction ×2, dedupe + cache).

🤖 Generated with Claude Code

@oratis oratis force-pushed the ux/ios-vault-dedupe-cache branch from b6157a1 to 42db00c Compare June 14, 2026 06:02
…b cache"

Two GitHub-vault tidies:

- Dedupe re-open: opening a repo that's already materialized now opens the local
  copy instantly instead of re-downloading the whole zipball (Refresh pulls the
  latest). Mirrors the desktop, which already reuses a cached vault. Guarded so
  the refresh fallback (which must re-download) is unaffected.
- Clear GitHub cache: downloaded vaults accumulate under Application Support with
  no way to reclaim space. Settings now shows the total size and a "Clear GitHub
  cache" action that removes every downloaded vault except the open one, plus the
  transient asset cache, then prunes dead switcher entries. Size/clear run off
  the main actor.

GitHubService gains nonisolated downloadedVaults() / clearCaches(keeping:) /
directorySize(); VaultStore.forgetMissingVaults(). EN + 中文 strings.

app simulator build ✓.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis force-pushed the ux/ios-vault-dedupe-cache branch from 42db00c to 7b687da Compare June 14, 2026 06:09
@oratis oratis merged commit 0f286e8 into main Jun 14, 2026
4 checks passed
@oratis oratis deleted the ux/ios-vault-dedupe-cache branch June 14, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant