Drop the Compose/Caddy example: production runs on Kubernetes, and locally
the container only needs a forwarded port and a volume. The README now gives
the `docker run` steps and what a Kubernetes deployment needs (one replica,
since it's a single SQLite file; a volume at /data; TLS at the ingress).
The server only shut down on Ctrl-C, so `docker stop` and pod termination,
which send SIGTERM, waited out the grace period and killed it. It now shuts
down gracefully on either.
Also ignore `.env`, which can hold the OIDC client secret.
Folder sync left too much to the user's sync tool: platform file access
(the Android SAF plugin), choosing the document, merging conflict copies —
and its merge base could fall out of step with the document (absorbing
conflict copies, "forget", picking a new Android folder), reading every
difference as a deletion.
The new mtgc-server crate stores one versioned library per user and accepts
a write only when it names the version it replaces. It never merges: devices
still do that with merge3, through a new sync cycle over a `Remote` trait in
mtgc-core. The base advances only on knowledge — to what was read, or to a
write the server confirmed — and is stored with the server and account it
belongs to, so a different account starts from an empty ancestor instead of
deleting. The working copy is only rewritten under the app-state lock, and
sync commands now run off the main thread.
Sign-in happens in the browser on the server's pages, via the owner's OIDC
provider and/or local username/password accounts (Argon2id, managed with
`mtgc-server user ...`), and returns a per-device revocable token to the app
by PKCE-protected code: a loopback port on desktop, the mtgc:// scheme on
Android.
The Info tab gains sign-in, the first-sync combine/replace choice, the
account's devices, and JSON export/import; the top bar shows sync state.
Includes a Dockerfile, Compose/Caddy example, and scripts to build and push
${DOCKER_REGISTRY}/mtgc/sync-server.
"Not owned" moves into the shared Quick filters icon-toggle row (hidden on
the Library tab, where it'd always be a no-op since that view is owned-only
already) instead of a standalone button.
Tiles view gains a "Horizontal" toggle that rotates actually-horizontal
cards (Battles, Planes, Phenomena) into their natural landscape orientation
via a container-query-sized wrapper, spanning two grid columns so the
rotated card isn't squeezed into a single portrait column's width and left
too small to read.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Filtering for creatures with an empty rules box can't be done from
`oracle_cards.oracle_text`: that column joins every face together, so an
Adventure card always carries its spell half's text and a naive `oracle_text
= ''` test would exclude exactly the cards worth including.
Derive it at ingest instead, from the front face's own text — the front is the
half that resolves as the creature, and adventure/prepared/transform cards are
all cast from it. Exposed as `vanilla_only` behind its own `has_vanilla`
capability check rather than folded into `has_universes_beyond`, since it
lands in a later reference-schema revision and a db can have one column
without the other. Needs a card-data re-download before it does anything.
Filtering by category alone wasn't granular enough: a deck usually matches
several archetypes and tribes at once, so "show me Archetype suggestions"
still returns most of the list.
SynergyReason now carries the matched thing itself (`subject`) alongside the
human-readable `detail`, populated at all four match sites. The modal adds a
second chip row listing every subject present in the current suggestions,
sorted by how many cards each explains and labelled with that count, so the
most useful narrowing is obvious before clicking.
Colorless
There was no way to ask for colorless cards — the colour toggles are a 5-bit
WUBRG mask where 0 already means "don't filter by colour", leaving nothing to
express "no colours at all". That's exactly what you need to find a colorless
commander's card pool.
Adds a "C" pip to both colour rows, matching how ColorPips already renders
colorless cards, backed by two explicit booleans rather than a sixth bit — a
filter mask and a card's real colour mask staying the same shape is worth
keeping. The two rows mean different things and both are useful: on the
commander row C filters colour *identity*, which is the Commander rule; on the
includes row it filters the card's own colours. A card printed colorless can
still carry a coloured identity through mana symbols in its text, and it's the
identity that bars it from a colorless commander's deck.
Set listings
News > Releases had its own card path and so couldn't be filtered. A new
set_code filter (matched against printings.set_code, already ingested) lets the
set browser run through search_reference instead, so every criterion works
there identically rather than being reimplemented over a live Scryfall
response.
That alone would have cost the ability to browse an upcoming set, since
search_reference only knows downloaded card data — and upcoming sets are half
the point of the tab. So the browser picks a source per set: downloaded data
where it exists, with the full filter panel; otherwise Scryfall directly, with
the panel hidden and a line explaining why. A panel that silently does nothing
would be worse than no panel.
The source is decided by an *unfiltered* probe. Keying off whether the current
criteria match anything would flip a properly indexed set to "live" the moment
a filter excluded everything, dropping the panel exactly when it was in use.
Android grants a *folder* through SAF, not a file, and the document name was
hardcoded to "library.json". A library named anything else was therefore never
found: the phone created an empty second library beside it and the two devices
silently never synced, while appearing to work.
The Info tab now lists the .json files in the granted folder and lets you choose
one. Picking an existing file adopts it — the working copy is dropped and
rebuilt from it, matching what desktop does when opening a document — while a
name that isn't there yet keeps the current library and publishes it, matching
New Library. The name is validated as a plain filename, since a path would
escape the granted folder that the SAF grant exists to bound.
Two bugs found while testing this on-device:
load_config decided whether a config was the pre-document format by testing
whether document_path or legacy_library_path were set. An Android install has
neither — its folder is a grant, not a path, and there is no legacy library —
so a valid config's document_name was discarded on every launch and the chosen
library file silently reverted to the default. It no longer infers the format
from which fields happen to be populated; every field defaults, and the legacy
library_path is picked up as a separate additive step. Covered by tests,
including one built from the exact Android config shape, because a setting that
quietly resets itself is not something a careful read catches.
The Info tab's sync refresh fired at mount when the app relaunched onto that
tab — the active tab is persisted — which is before setup() calls manage(),
producing "state not managed for field db". Gated on statusLoaded like the
startup refresh already was; get_status retries until the backend is ready, so
waiting on it is what guarantees the state exists.
The app knew nothing about the game outside your own collection — no way to
see that a set drops next week, or that a Secret Lair was announced.
Two sources with very different reliability, kept apart so one failing can't
take the page down.
Releases come from Scryfall's documented /sets endpoint. Clicking a set fetches
its cards live rather than reading reference.db, so a set released or spoiled
since the last card-data download still works; ownership is joined locally by
oracle_id, and the same add-to-library stepper works there as anywhere else.
Articles have no supported source at all: Wizards publishes no RSS or Atom feed
and no public API, and their page is a Nuxt app whose CSS classes are per-build
hashes. So the app links out rather than reproducing anyone's writing, which
keeps the scraped surface to titles and hrefs. parse_articles keys on nothing
cosmetic — anchors pointing at /en/news/<category>/<slug>, taking the anchor's
own text as the title. A restyle can't break that; only a change to their URL
scheme could, and the fixture tests fail loudly when it does rather than the
page quietly going empty. Verified against a live capture: 15 articles, correct
titles and categories.
Two things the fixtures caught. Where an article is linked several times per
card, the first link is a "Learn More" button, so the longest text wins rather
than the first. And a *successful* fetch yielding zero articles is treated as a
failure, since that is the signature of their markup changing.
get_set_cards returns a full CardRef rather than the handful of fields the grid
needs, so the tab renders the same CardTile as the rest of the app and gets
click-to-preview instead of a lookalike that does nothing when clicked.
Both feeds cache to news-cache.json for six hours and fall back to whatever was
last seen, so opening the tab offline shows stale content with its age rather
than an error.
Also promotes the HTTP agent out of ingest.rs into a shared http module, so
timeouts and User-Agent can't drift between the ingester and anything else that
reaches the network. Adds tauri-plugin-opener for opening articles externally.
Picking a library left the path bar showing the previous one until the next
launch: it reads status.library_path from get_status, but sync_set_document
returns a SyncStatus, and nothing re-fetched the former.
The less visible half was that every view kept rendering the old library's
rows. Switching documents replaces every card, deck and internal id beneath
them, so they're now keyed on the document path and remounted rather than left
reconciling state belonging to a library that is no longer open — which matters
most for Decks, whose persisted "last selected deck" id means nothing in a
different library.
Both Open and New Library now go through one adoptDocument(), which refreshes
status, library stats and the views together, and reports what was opened
("Opened …/decks-v1.json — 366 cards, 7 decks") so a successful switch isn't
silent.
The backend was already correct: it had loaded the picked document all along.
It's an implementation detail the app deliberately hides: the user names and
moves a JSON file, and nothing else. Documenting the derived SQLite copy
invited people to think about (or back up, or move) a file that is rebuilt on
demand. The rationale for keeping it in private storage stays where it belongs,
in sync.rs's module docs.
The data-model section still described library.db as "the file you sync",
which is no longer how any of this works. Replace it with the document +
internal working copy split, and add a Sync section covering the three-way
merge, when sync runs, and the one-time conversion from an older library.db.
Also: the app is no longer desktop-with-a-future-mobile-port, so say so;
document the SAF folder grant on Android and why no storage permission is
declared; list the filters added since this was last touched, including the
caveat that the reference.db-backed ones need one card-data rebuild; and
mention the shell test suite and the Kotlin-only typecheck.
Sync
The previous design put the merge inside SQL: timestamp-stamping triggers,
a tombstone table, per-device SQLite snapshots, a device id in the database,
and row merges written as correlated-subquery UPDATEs. All of that schema
was inherited by desktop, and the merge was very hard to verify.
Replace it with a single JSON document plus a three-way merge in plain Rust.
Storing the last-read remote document as the merge base makes "who changed
what" and "what was deleted" derivable, which removes the tombstone table,
the updated_at columns and all eight triggers. It also makes a single shared
file safe: if a publish is lost the remote is unchanged, so the next merge
re-detects the local edits and republishes rather than reading their absence
as a deletion. That removes the need for per-device files and for device
identity entirely. Schema impact drops to one column, decks.uuid.
Conflicts resolve to "theirs", which is required for convergence rather than
chosen for taste — preferring ours has each device re-asserting its own value
forever. Every such choice is reported to the user.
SQLite becomes invisible: the working copy lives in the app data dir and the
user only ever names a .json file. There is always a document, defaulting to
private storage, so edits are never stranded with nowhere to be saved.
Pointing at a file that doesn't exist yet moves the current library there;
pointing at one that does adopts it. A converter brings a pre-document
library.db across.
Android reaches the folder through the Storage Access Framework rather than
MANAGE_EXTERNAL_STORAGE, so no storage permission is declared at all.
Filters
Track card origin in reference.db: Universes Beyond, digital-only and
Un-set cards, plus numeric power/toughness. Each origin flag is derived as
"every printing", not "any printing" — ordinary cards get reprinted into
those sets, and Lightning Bolt appearing in Marvel Commander must not hide
it. Non-numeric power ("*", "1+*") stays NULL so it drops out of range
filters instead of being compared as zero.
Also wire up filters over data already present: price range, format legality
(restricted counts as legal) and "can be a commander". All of these degrade
silently against an older reference.db rather than failing every query.
The shared criteria live in one component used by both filter panels, as a
compact row of icon toggles.
Card Search gains the Library tab's bulk selection: checkboxes in both views,
select-all, and a bulk add-to-deck with a single undo for the whole batch.
- Library/Card Search/Deck tables stack into dense card-style rows below
720px instead of scrolling horizontally (floated thumbnail, wrapping
chips for MV/Owned/color pips).
- Deck view: fix desktop min-widths and a non-wrapping button row that
forced horizontal scroll on phones; split the deck list and the
deck-building pane into separate drill-down screens with a back button
so a long deck list doesn't bury the builder.
- Suggested Cards modal: fix action buttons crushing the card name down to
one word per line by giving them their own full-width row.
- Add a close (X) button to the shared dialog title bar — mobile has no
Escape key and wide dialogs leave little backdrop to tap.
- Info tab, bottom-nav loading/safe-area fixes, and Gradle NDK_HOME
inheritance fix carried over from the Android bring-up work.
"Download card data" had been failing on every platform with "missing field
`download_uri`". Scryfall changed the bulk-data API: entries now carry
`jsonl_download_uri`/`compressed_size` instead of `download_uri`/`size`, and
the payload is gzipped JSONL (one card object per line) rather than an
uncompressed JSON array. An existing reference.db keeps working, which is why
this went unnoticed.
- Rename the BulkEntry fields and decompress with flate2 (the response is
Content-Type: application/gzip with no Content-Encoding, so ureq won't
transparently inflate it). rust_backend keeps it pure Rust, so nothing new
has to cross-compile for Android.
- Replace the streaming JSON-array visitor with a line-based JSONL parser.
Closure errors now propagate directly instead of being laundered through
serde::de::Error::custom, so cancellation reports a clean Cancelled;
override_if_cancelled stays as a safety net and its doc comment is corrected.
- Progress wraps the compressed stream, since compressed_size is what the index
reports.
- Test fixtures stay readable pretty-printed JSON arrays via a jsonl() helper
that converts them, so tests still exercise the production parser.
Downloads are far smaller now: 101MB compressed (24 + 77) versus ~740MB, which
matters a lot on a phone.
Also log command failures to the platform log. Tauri command errors are
returned to the WebView as values, so they never reached logcat and the UI only
showed them truncated -- this bug was invisible until then. mlog! is a plain
eprintln!, which tao's Android glue forwards to logcat under RustStdoutStderr,
so no logging dependency is needed. View with: adb logcat -s RustStdoutStderr
Verified against the live API: 36,242 oracle cards, 116,409 printings, trigram
FTS working, and the aarch64 APK still builds.
cargo-mobile2 locates Studio by scanning XDG data dirs for a .desktop entry
whose Name is exactly "Android Studio", then runs its Exec line. A standalone
install writes that name; JetBrains Toolbox writes a versioned one ("Android
Studio Quail 2 2026.1.2 Patch 1"), so the lookup misses and it falls back to
running "Android Studio" as a literal command, failing with an ENOENT that
names every env var except the actual problem.
android-setup.sh now writes a hidden shim entry when no exact-name match
exists, reusing the Exec line Toolbox already generated rather than hardcoding
a path. Idempotent: a later run reports Studio as discoverable and rewrites
nothing.
Only the env helper needs a per-shell variant, since it has to mutate the
calling shell; android-setup.sh is executed rather than sourced and already
works from fish.
The fish version finds NDK/JDK candidates via `find` rather than globs because
fish raises an error on a wildcard matching nothing, and "SDK with no ndk/
directory yet" is a normal state the helper has to report cleanly.
Also switch the bash helper's NDK selection to `find | sort -V` so the two
agree: glob order is lexicographic, which would rank 9.x above 10.x. Verified
both pick the same NDK and JDK on this machine and against a fixture with
9.0.111 / 10.0.222 / 28.2.333 / 30.0.999-beta2 installed.
scripts/android-env.sh exports ANDROID_HOME/NDK_HOME/JAVA_HOME by
auto-detection, so there are no machine-specific paths to keep in sync. It
skips prerelease NDKs when several are installed and prefers Android Studio's
bundled JDK 21, which Gradle accepts.
Also document that Android Studio must be launched via
`cargo tauri android dev --open` rather than by opening src-tauri/gen/android
directly: Studio's Run button delegates the Rust build to
`tauri android android-studio-script`, which reads the dev-server address from
/tmp/<identifier>-server-addr and fails with "missing addr file" if no Tauri
dev session is running. `cargo tauri android build` needs no addr file.
The Rust core was already portable (caller-provided db paths, rustls rather
than openssl) and the shell already had the mobile entry point, so this is
mostly toolchain, provisioning, and platform-gating.
Toolchain:
- scripts/android-setup.sh installs what Android Studio doesn't: SDK
cmdline-tools, a pinned stable NDK, and the Rust Android targets. The NDK is
pinned rather than "latest" because sdkmanager's newest is often a beta
(30.0.15729638 is r30-beta2) -- not something to compile SQLite with. Prefers
Android Studio's bundled JDK 21, since Gradle rejects newer JDKs.
- Track src-tauri/gen/android (excluding build output): AndroidManifest.xml is
hand-edited and Android permissions have no tauri.conf.json equivalent.
- vite: serve on TAURI_DEV_HOST so a device/emulator can reach the dev server.
Card data: downloading streams ~740MB to build a ~73MB db, which is rough on a
phone. Add import_reference_db to adopt a desktop-built file instead, validated
by db::inspect_reference_db first so picking the wrong file is a clean error
rather than a broken install. Installs via copy-then-rename so an interrupted
copy can't leave a partial db.
Ingest hardening (helps desktop too):
- Give ureq connect/read timeouts. Cancellation is only polled per parsed
record, so a stalled socket previously hung forever with no way to cancel.
- Drop the remove_file before rename; POSIX rename already replaces atomically,
and the delete-first window could leave no reference.db at all if the process
was killed -- much likelier on Android.
UI: hide Open/New Library on mobile (scoped storage has no arbitrary-path
equivalent, and SQLite can't open a content:// URI), reported via a cfg!(mobile)
flag on Status rather than user-agent sniffing. Use 100dvh so the soft keyboard
doesn't break the shell.
Verified: 70/70 core tests, desktop build clean, and the aarch64 APK builds
(bundled SQLite C and ring both cross-compile under NDK 28). Not yet run on a
device.
The UI had a good terracotta-on-dark system that wasn't applied
consistently — magic-number spacing, ad-hoc page headers, ~6 copied
panel surfaces, ~8 drifting label variants, and scattered accent use.
- Tokens: warm the neutral ramp, add spacing/radius/type/motion scales,
--accent-quiet + panel highlight. Terracotta hue unchanged.
- Primitives: .panel, .section-label, .page-header/.toolbar — collapse
the copied surfaces and label variants onto shared classes.
- Unify each filter-heavy page's display controls (group/sort/view,
select-all, count) into a workspace toolbar inside the filter panel,
so they read as one surface instead of floating above it.
- Labels: sentence-case, higher-contrast form labels; uppercase section
markers bumped faint -> muted.
- Accent hierarchy: reserve full terracotta for primary actions/active
state; demote decorative labels and the group-header underline.
- Responsive groundwork: reflow classes for the deck two-pane and nav
rail (stacks / icon-collapse at breakpoints), touch-target sizing.
Desktop unchanged in kind.
Shows type line, mana value/colors, price, per-format legality pills,
and ownership context (owned copies, decks it's in) when the caller
has that data — LibraryCard/DeckEntry rows do, bare CardRefs don't, so
the section just omits itself when absent.
The info tile sits beside the card art via flex-wrap and drops to its
own line on narrow viewports, rather than shrinking either face to
make room. Also shrinks a double-faced Battle's rotated front face
when it has a sibling back face, so it no longer renders at
full single-card size next to a much smaller back face.
Card previews were picking whichever printing happened to load first
during ingest (ORDER BY rowid over every printing, promos and foreign
versions included), so a card's default image was effectively random.
Capture the representative printing's images straight from the Oracle
Cards bulk pass instead, and prefer that over the old printings-table
guess, falling back gracefully on an older reference.db that predates
these columns.
Also add docs/printing-tracking-design.md, a design (not yet
implemented) for optionally tracking which specific printing/finish a
library or deck card is.
Real Battle cards are layout "transform" (they flip into a creature),
not "battle" as previously assumed — no shipped card actually uses
that layout, so the horizontal flag never got set for them. Detect
Battle orientation from the front face's type line instead.
Card Search browses the whole downloaded card universe (not just owned
cards), reusing the Library tab's filter/group/sort/list/tiles UI; results
show ownership and offer quick "own" and "add to deck" actions.
Battles, Planes, and Phenomena store their Scryfall image portrait-shaped
with the content itself rotated, so hover/click previews now detect this
(a new `horizontal` flag threaded through ingest and every card query, with
graceful fallback for a reference.db built before the column existed) and
rotate the image back into place. Single-faced and non-DFC cases are
verified fixed; a double-faced Battle's front face still needs another pass.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Suggestion scoring is fully offline (tribal/mechanic/archetype/mana-base
signals derived at ingest, no external synergy database), with an "unusual
picks" mode that surfaces underappreciated cards instead of staples. The
deck page's top panels now use a CSS grid so wide windows don't waste
horizontal space. Library's bulk add-to-deck can clobber existing deck
quantities, so it now offers an undo (snackbar + command palette, the
latter with no timeout) that restores each card's prior state exactly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Threads Scryfall's per-format legalities through the reference db and adds a
deck-page indicator (structural rules + banned/restricted lists) that lists
violation reasons inline. Decks and selected library cards can now be
exported to/imported from plain-text decklists, with best-effort name
resolution and a report of anything that didn't match. Also adds a shuffle-
and-draw sample hand modal, and an Alt+/ command palette for jumping to a
tab, deck, or card without leaving the keyboard.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Prices come from Scryfall's prices.usd on printings, shown as a hover badge
on card tiles. The price is picked independently of whichever printing
supplies the display image (the cheapest known price across all printings),
since the display printing is often a promo/variant with no listed price.
The maybeboard lets a deck track cards under consideration without counting
them in deck analysis stats or library assignment totals. Cards move between
mainboard and maybeboard via a per-card toggle; maybeboarding the commander
clears commander status.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Threads a new produced_mana/produces_colorless field through the whole card
read path (ingest, library, filters, decks, search) so the deck view can
show what colors a deck's manabase actually produces, alongside its existing
color identity. Also adds a mana consumption bar (colored casting costs of
nonland spells) and stacks the mana curve histogram by color. Adds an
oracle-text substring filter to the library search, mirroring the existing
location filter. Rearranges the deck sidebar list into two rows (name, then
format chip + actions) so long names and action buttons no longer collide,
and removes the drop shadows from the commander hero panel/image.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Mirror the Library tab's multi-select: checkboxes on every row/tile,
a "Select all" toggle, and a bulk-action bar with a single "Remove
from deck" action (reuses CardTile's cornerLeft/selected support and
the existing .bulk-bar/.tile-select styling — no new CSS needed).
- Replace the deck table's plain number input (which only committed on
blur) and the tile view's static "in deck ×N" badge with the same
QtyStepper used in the Library tab, so bumping a card's count no
longer means removing it and re-adding it. Decrementing to 0 now
gets the same grace-period undo as the Library tab (dims the row for
5s, + brings it back) instead of deleting it from the deck instantly.
- QtyStepper's `warn` state now flags deck cards you don't own enough
copies of (scoped to cards you own at least one of, so every row in
the already-labeled "Not owned" section doesn't light up too).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Checkboxes on every row/tile plus a "Select all" (filtered-set-aware,
indeterminate-aware) toggle in the toolbar.
- A bulk-action bar appears once anything's selected: add to a deck
("Add 1" sets each selected card to 1 copy, "Add All" sets it to
however many you own — the latter is the one-click fix for bulk-adding
a stack of basic lands), set location, and adjust owned quantity by a
configurable delta. All reuse the same per-card commands the
single-card UI already calls, so behavior stays consistent (including
the existing grace-period undo on quantity_owned hitting 0).
- CardTile gains a `cornerLeft` slot and `selected` prop (ring highlight,
keeps the checkbox visible without hovering) to support this in tile
view without disturbing the existing top-right qty-stepper corner.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- New logomark: an original pirate-ship silhouette (hull, twin billowing
sails, swallow-tail pennant) in the terracotta brand gradient on a dark
square — a nod to the MTG card "Pirate Ship", not a reproduction of its
art. Source at src-tauri/icons/logo-source.svg; regenerate the full
platform icon set (desktop/Windows Store/iOS/Android) with
`cargo tauri icon src-tauri/icons/logo-source.svg`.
- Apply it in-app via a new inline ShipLogo component (App.tsx), replacing
the old "M" sidebar mark and "✦" empty-state mark with dark rounded
squares containing the ship glyph.
- Rename the app to lowercase "mtgc" everywhere: window title and
productName (tauri.conf.json), <title> (index.html), sidebar brand text,
empty-state heading.
- Rename the Tauri package/binary mtgc-app -> mtgc (and its lib crate
mtgc_app_lib -> mtgc_lib), so `cargo tauri build` now produces
target/release/mtgc; updated main.rs and every README reference.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Status gains reference_updated_at (sourced from reference.db's file
mtime, so it needs no separate persisted state) and the sidebar's
"Your library" panel shows it as a relative "Updated Xh ago" stamp
that self-refreshes every minute.
- Add a Location field to the Library tab's filters panel, wired to the
new LibraryFilter.location.
- Bump every font-size in the stylesheet up one step for a slightly
larger, easier-to-read UI overall.
- Fix the library/deck tile view's +/- quantity overlay permanently
covering the card art's own printed mana cost (top-right corner) —
it now only fades in on hover/focus, like the other row actions.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
LibraryFilter.location does a case-insensitive substring match against
the stored location (e.g. "Box 1"), mirroring the existing text filter.
Tested for substring/case-insensitivity and the empty-string no-op case.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- DeckView: rename/duplicate/delete deck via row-hover icon actions, with
a ConfirmDialog for delete and PromptDialog (with friendly name-
collision errors) for rename/duplicate.
- Add a shared IconButton (plus overlay/danger variants) and replace
every ad hoc close/remove button in the app with it: deck actions,
remove-card-from-deck (list and tile), clear-commander, the card-
preview close, and the ingest-progress dismiss.
- Fix native <select> (Group by, Format, In deck): only color/border were
overridden, leaving native OS chrome (height, arrow, popup) in place.
Drop appearance and draw a custom chevron so they match text inputs.
- Click-to-preview: show both faces of a double-faced card side by side
on wide viewports instead of requiring Flip, and size the preview
images larger overall.
- Sidebar footer: replace the plain "N cards" line with a "Your library"
panel (unique/copies/decks tiles + a WUBRG color-distribution bar),
polling get_library_stats while card data is loaded.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New LibraryStats (unique cards owned, total copies, deck count, and
per-color copy counts including colorless) via Catalog::library_stats,
tested against the fixture catalog.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New Catalog::rename_deck / duplicate_deck (duplicating format, commander,
notes, and every deck_cards row under a new name), with tests covering
the UNIQUE(name) collision cases the UI needs to surface as friendly
errors rather than raw SQL messages.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Fix keyboard-nav selection highlight (search results, deck list): the
Discord-styling rewrite dropped the --panel-2 CSS variable it relied
on, so ↑/↓ moved selection but rendered no visible highlight.
- Add click-to-preview: clicking a card thumbnail/tile now opens a
larger centered modal (list and tile views), with a flip button for
double-faced cards' back face. Hover preview is unchanged and clears
when a click-preview opens.
- Add a QtyStepper component (rounded [− N +] pill, with an `overlay`
variant for tile corners) and use it consistently for owned-copy
counts on Add Cards, and the Library list and tile views.
- Add matching +/- steppers to the Library views; decrementing to 0
dims the row for a 5s grace period (still fully interactive) before
it drops out, so an accidental removal can be undone with +.
- Topbar: fill remaining width with the library path (no more premature
truncation), add icons to Open/New Library and Download/Update card
data, and drop the trailing "…" from the library buttons.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Remember which library.db was last chosen (via a small config.json in
the app-data dir) so relaunching the app reopens the same file instead
of always defaulting to library.db.
- Fix set_library_path returning a hard error (and thus never updating
the topbar) whenever the reference catalog fails to reopen against the
new path — e.g. a stale reference.db schema. Picking a library file
and successfully reattaching the reference db are separate concerns;
the chosen path now always persists and is reported back, with the
catalog reopened best-effort.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a back_image_uri column to printings, populated during ingest from
a card's second card_faces image (only present for transform/MDFC/
reversible cards — split/adventure cards share one combined image and
correctly get ""). Plumb it through CardRef across every query path
(search, library, filters, deck contents) via the same printing row,
using a shared deterministic ORDER BY so front/back always come from
one printing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Exclude Scryfall Art Series cards (layout "art_series") from ingest —
they aren't playable cards and were polluting search results.
- Replace the coarse per-stage progress text with a byte-accurate,
weighted multi-segment progress bar (Index / Card data / Printings /
Indexing) that fills as one continuous bar instead of swapping per
stage; segment weights are computed from the real download sizes
reported by Scryfall's bulk-data index (the download responses
themselves are chunked with no Content-Length to rely on).
- Add a Cancel button, wired through a new CancelToken checked once per
parsed record so cancellation lands almost instantly.
- Fix a related correctness bug this surfaced: ingest used to delete the
existing reference.db before writing its replacement, so a cancelled
or crashed update left the app with no card database at all. It now
builds into a temp file and only atomically replaces reference.db on
full success.
- Split the topbar's single "Choose library…" action into separate
"Open Library…" (existing file) and "New Library…" (save-dialog for a
new file) buttons.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Lets you quickly correct duplicate-copy counts right after adding a
card, instead of navigating to the Library tab.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restrict tauri.conf.json bundle targets to deb/rpm so `cargo tauri
build` no longer produces an AppImage (the README's AppImage mentions
were already dropped in the prior commit).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Tauri v2's Linux backend hard-depends on GTK3 + webkit2gtk-4.1; GTK4
support is tracked upstream (tauri#7335, tao#1104, wry#1228) but
unmerged with no ETA. Note this so it isn't re-investigated from
scratch later.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>