Commit graph

6329 commits

Author SHA1 Message Date
Lukas Brübach
e4df0fe9d3 [DeckShare] End the public-decks files with a trailing newline
keeps the final line's diff clean and stops clang-format CI from flagging
the files.
2026-09-19 08:24:22 +02:00
Lukas Brübach
389a6d9e8a [DeckStorage] Drop the unused tree widget model accessor
The accessor handed the model out past the wrapper methods that exist to
keep it encapsulated, and nothing in the stack called it.
2026-09-19 08:24:22 +02:00
Lukas Brübach
c301ebd5d6 [VDS] Share one color-identity match rule between the two deck grids
The remote public decks model verbatim-copied updateColorMatches' switch,
down to the ExactMatch normalization and the fact that Includes/Excludes do
not normalize case. Extract colorIdentityMatches() next to the FilterMode
enum and call it from both so the subtle rule cannot drift.
2026-09-19 08:24:22 +02:00
Lukas Brübach
40ac336a28 [PublicDecks] Keep the empty and status variants correct across language changes
retranslateUi unconditionally rewrote the empty label to the 'nothing
published' variant, stomping the 'no decks match your filters' choice
rebuildGrid had made, and a visible loading message stayed in the old
language. Let retranslateUi pick the same variant rebuildGrid does and
re-show the status so it retranslates.
2026-09-19 08:24:22 +02:00
Lukas Brübach
6b75015f41 [PublicDecks] Run retranslateUi at construction and name the refresh button
retranslateUi was never called from the constructor, so the tooltips set
there were absent until a language change. Call it before the first refresh,
and give the icon-only refresh button an accessible name for screen readers.
2026-09-19 08:24:15 +02:00
Lukas Brübach
c17d56f395 [DeckStorage] Distinguish an inherited public state in the visibility column
The column reported the effective state while publishing toggles the node's
own bit, so a private deck inside a public folder already read 'Public' and
toggling appeared to do nothing (and toggling again silently unpublished
it). The cell now shows 'Public (inherited)' for that case and the tooltip
explains why.
2026-09-19 08:24:15 +02:00
Lukas Brübach
f1a827e70f [PublicDecks] Escape remote-crafted text in tooltips and the tab title
Deck names and usernames come from other users' records and Qt renders
QLabel tooltips as AutoText, so a name like '<h1><table>...' parsed as
markup. Escape and bound the deck-name tooltip and escape the username
interpolated into the title label.
2026-09-19 08:24:15 +02:00
Lukas Brübach
39178f91c8 [PublicDecks] Time out the loading state so a dropped reply cannot wedge the tab
loading only cleared in decksReceived, but the ping sweep can drop a pending
command without ever emitting finished, leaving the tab stuck on 'Loading
public decks...' and the refresh button permanently inert. A single-shot
timer started per refresh clears the latch and reports a timeout; the latch
also clears when the client disconnects.
2026-09-19 08:24:06 +02:00
Lukas Brübach
972b7a7c27 [DeckStorage] Summarize batch publish failures when the batch drains
Each rejected node stacked its own modal dialog, so publishing a ten-deck
selection against a rejecting server made the user dismiss ten dialogs one
at a time. Failures are now collected while the batch is in flight and shown
as a single summary when the visibility refresh timer fires; a reply that
lands outside an active batch still reports right away.
2026-09-19 08:24:06 +02:00
Lukas Brübach
3608e53453 [DeckStorage] Refresh the visibility column with a guarded timer instead of a latch counter
A dropped visibility reply used to leave the pendingVisibilityChanges
counter permanently positive, so the Public/Private column never refreshed
again and nothing reset it on disconnect. A restartable single-shot timer
with a boolean guard re-reads the tree whenever publishes quiet down and is
stopped on disconnect, so a lost reply costs one stale refresh instead of
killing the column for the session.
2026-09-19 08:24:06 +02:00
Lukas Brübach
8aedee2b4e [DeckShare] Adapt deck upload to the server-derived banner and tag protocol
The server now derives the banner card and tags from the uploaded deck
list itself, so Command_DeckUpload only carries the client-computed color
identity. Drop the reserved banner/tag setters from the editor and storage
uploads, send the color identity on remote saves, and read tags from the
now-repeated ServerInfo_DeckStorage_TreeItem field.
2026-09-19 08:24:06 +02:00
Lukas Brübach
bb23bc0aa3 [DeckShare] Browse and open public decks with loading, error and accessibility states
Add a public-decks tab that lists decks published by other users using the
server's deck visibility feature, previewing each deck's banner card, color
identity, tags and upload time without downloading the deck list until the
user opens it.

- Add a public-decks tab with a shared-settings widget and a remote model
  that fetches the target user's decks and refreshes both automatically and
  on user request, with a loading indicator and a server-error message
  instead of a blank tab when the fetch fails or the connection drops
- Render each deck as a focusable preview tile whose banner, color identity,
  tags and upload time follow the existing Preview settings, with the deck
  name announced as the tile's accessible name and Space/Enter opening the
  deck, mirroring the shared-deck preview tile
- Show a message box when opening a public deck fails or arrives corrupted
- Publish and unpublish decks from the server storage toolbar and context
  menu, toggling the deck's own visibility bit (what the server persists)
  rather than the inherited effective state, and batch the visibility
  refresh until the last in-flight change is acknowledged
- Add the Show Upload Time setting so the tile's upload stamp can be hidden
  like the other preview details
- Update the retranslateUi wiring for the new public-decks tab and rename
  the share action tooltip from "Deck share" to "Share link"
2026-09-19 08:24:01 +02:00
Lukas Brübach
fcaf94553d [Client] Redact share secrets from activation URL logs 2026-09-19 08:07:37 +02:00
Lukas Brübach
82d71344f1 [Client] Skip the startup connection when a macOS URL launch owns the connection 2026-09-19 08:07:37 +02:00
Lukas Brübach
4be2dd2f22 [DeckShare] Keep arrow-key navigation between flow items inside a scroll area 2026-09-19 08:07:37 +02:00
Lukas Brübach
c6cebb0d2b [Client] Treat a busy single-instance primary as alive instead of stealing its socket 2026-09-19 08:07:37 +02:00
Lukas Brübach
ce42ff0ba0 [Client] Drain a single-instance payload before its handlers read the socket again 2026-09-19 08:07:37 +02:00
Lukas Brübach
116c79802f [DeckShare] Time the share-list round trip and backstop silently-destroyed intent chains 2026-09-19 08:07:37 +02:00
Lukas Brübach
668b8ab931 [DeckShare] Reformat the link sign-in intent constructor 2026-09-19 08:07:37 +02:00
Lukas Brübach
9448014834 [DeckShare] Confirm the share link's target server before opening a deck 2026-09-19 08:07:37 +02:00
Lukas Brübach
3c68f4dc40 [Settings] Match a server on the exact host and port when adding it 2026-09-19 08:07:37 +02:00
Lukas Brübach
a65648aa97 [DeckShare] Track link-intent chains per-run so each can restore its own session 2026-09-19 08:07:37 +02:00
Lukas Brübach
c4d92b012e [DeckShare] Let intent chains opt into the link sign-in dialog 2026-09-19 08:07:37 +02:00
Lukas Brübach
f2c94f3833 [DeckShare] Forward a dependency's cancellation as the owner's own 2026-09-19 08:07:37 +02:00
Lukas Brübach
d93671e62a [DeckShare] End the open-shared-deck files with a trailing newline 2026-09-19 08:07:37 +02:00
Lukas Brübach
0fc7023335 [DeckShare] Open shared decks via links with a gated preview flow
- Serialized url-chain dispatcher in IntentUrlParser; queue-drained
  urlChainFinished(bool) drives the startup auto-connect fallback
- Open-shared-deck intent with sequential download state machine,
  15s per-item timeout, partial-success offer, livable Cancel via
  ApplicationModal dlg_login_prompt interactive fallback
- Preview dialog: download progress label, share vocab sweep,
  palette-highlight selection frame, Space/Enter keyboard toggle,
  NoFocus checkbox, double-click tile opens immediately
- Confirm-before-server-migration with one-shot restore to the
  previous server on failed/cancelled chains (statusChanged settle
  deferral), hostname-only identity comparisons
- Skip credential link when already connected; arrow-key navigation
  in FlowWidget; card glows use palette highlight
- Address code-review M1-M4 and UI/UX QA blockers 1-2
2026-09-19 08:07:37 +02:00
Lukas Brübach
ae937e3b60 [DeckShare] Include the network settings header used by the share timeout 2026-09-19 08:07:36 +02:00
Lukas Brübach
081b13f9a2 [DeckShare] Keep the settings include in the project include block 2026-09-19 08:07:36 +02:00
Lukas Brübach
4e2a22daaf [DeckShare] End the share-related headers and sources with a trailing newline 2026-09-19 08:07:36 +02:00
Lukas Brübach
a90a080457 [DeckShare] Let the share bar owners supply the hint text 2026-09-19 08:07:36 +02:00
Lukas Brübach
ce4a3289a5 [DeckShare] Forward retranslateUi to the visual deck storage widget 2026-09-19 08:07:36 +02:00
Lukas Brübach
9becf0f4ad [DeckShare] Retranslate the share button tooltip with the storage widget 2026-09-19 08:07:36 +02:00
Lukas Brübach
addb578d66 [DeckShare] Join the selected-count label with a non-translatable separator 2026-09-19 08:07:36 +02:00
Lukas Brübach
6bd25f79e5 [DeckShare] Provide the full share hint in each plural form 2026-09-19 08:07:36 +02:00
Lukas Brübach
fdc43f623a [DeckShare] Recover the share controls when the server never answers 2026-09-19 08:07:36 +02:00
Lukas Brübach
e6d6cbde1e [DeckShare] Replace the duplicate computeColorIdentity with the shared getDeckColorIdentity 2026-09-19 08:07:36 +02:00
Lukas Brübach
65adf1c6af [DeckShare] Build share links with QUrl and QUrlQuery for percent-encoding 2026-09-19 08:07:36 +02:00
Lukas Brübach
0cd900fc60 [DeckShare] Format share expiry with the locale-aware short format 2026-09-19 08:07:36 +02:00
Lukas Brübach
9bf9d9824b [DeckShare] Drop includes left unused by the share-response extraction 2026-09-19 08:07:36 +02:00
Lukas Brübach
6bf64ea712 [DeckShare] Extract the share-creation response handling into DeckShareUtils 2026-09-19 08:07:36 +02:00
Lukas Brübach
389dc8ac17 [DeckShare] Use the stable server client for the visual deck storage tab 2026-09-19 08:07:36 +02:00
Lukas Brübach
e5bb22afa3 [DeckShare] Fix share-link expiry build on the minimum-supported Qt
QTimeZone::UTC (the Initialization enum) only exists since Qt 6.7, so
Debian 12 and Ubuntu 24.04 (Qt 6.4) fail to compile the share-link expiry
handling in the share dialog and the two deck-storage tabs. Mirror the
existing games_model guard and fall back to Qt::UTC on older Qt.
2026-09-19 08:07:36 +02:00
Lukas Brübach
34e682d25b [DeckShare] Address review findings and harden the share flows
Gate every share entry point on login, de-duplicate the share-link and
color-identity logic behind DeckShareUtils and an injected querier, and
replace the silent tray/status-bar notices with always-visible dialogs.

- abstract_tab_deck_editor: explain that sharing requires a connection
  instead of silently doing nothing when logged out
- tab_deck_storage: disable the share action on disconnect, reject
  folder/deck mixes and the root folder with clear warnings, re-enable
  Create on every entry/response so a dropped connection cannot leave
  the button disabled
- tab_deck_storage_visual: same login gate for the context-menu entry,
  visible success/error dialogs, and a symmetric in-flight guard
- getDeckColorIdentity now takes a CardDatabaseQuerier, dropping the
  CardDatabaseManager singleton access and enabling unit tests
2026-09-19 08:07:36 +02:00
Lukas Brübach
c178bc062b [DeckShare] Create temporary share links for local and server decks 2026-09-19 08:07:17 +02:00
Lukas Brübach
c1c94c2624 [VDS] Address review: dead code, chip reparenting, filter signal and sort fast-path 2026-09-19 08:06:58 +02:00
Lukas Brübach
1dc45a4765 [VDS] Decouple tag filter and fix reordered-chips crash 2026-09-19 08:06:58 +02:00
Lukas Brübach
380bddb15e Document transaction teardown in deck share rollback paths 2026-09-19 08:06:58 +02:00
Lukas Brübach
30ed2a69a0 Address server review comments for deck share links 2026-09-19 08:06:58 +02:00
Lukas Brübach
8f674aab78 [Server] Add deck share links and public deck visibility 2026-09-19 08:06:58 +02:00
RickyRister
51365960fe
[Client] Create custom pawn for dev role (#7295)
* [Client] Create new pawn for dev role

* lighten color
2026-09-18 10:58:10 -07:00