Adds OS-level URL-scheme handlers so users can click a link in a browser,
chat client, or third-party tool to launch Cockatrice straight into a
server / game / Oracle update.
Supported URL forms:
cockatrice://joingame?hostname=H&port=P&roomid=R&gameid=G[&spectate=1]
cockatrice-oracle://update[?spoilers=1]
Credentials passed via URL (username/password query params) are deliberately
ignored — URLs leak through shell history, browser history, EDR capture, etc.
If the target server requires auth and no saved credentials match, the Connect
dialog opens pre-filled with the URL's host/port so the user types their
password locally.
OS integration
- Linux: MimeType=x-scheme-handler/cockatrice (and -oracle) added to the
.desktop files; Exec=cockatrice %u passes the URL through.
- Windows: NSIS installer writes HKCR\cockatrice and HKCR\cockatrice-oracle
registry entries; uninstaller removes them.
- macOS: per-app Info.cockatrice.plist / Info.oracle.plist declare
CFBundleURLTypes; a QFileOpenEvent filter is installed on QApplication
before any nested event loop so cold-start URLs aren't lost.
New abstractions
- Intent (libcockatrice_utility/libcockatrice/utility/intent.h): abstract base
for chained async actions. Guarantees finished() fires at most once,
execute() is idempotent, self-deletes via deleteLater, and
startTimeoutSafetyNet() arms a configurable per-stage deadline. Concrete
intents (IntentConnectToServer, IntentLogin, IntentJoinServerRoom,
IntentJoinServerGame) compose the joingame flow via UrlParser.
- SingleInstanceManager: async per-user local-socket primary/secondary
handshake; URL forwarded from secondary to primary with QDataStream framing
both ways. shared_ptr-backed resolved flag survives every lambda capture.
- UrlSchemeEventFilter (new libcockatrice_utility_gui sibling library): QObject
event filter that translates macOS QFileOpenEvent into a urlReceived(QString)
signal. Lives in its own Gui-bearing lib so libcockatrice_utility stays
Core+Network only and doesn't drag Qt::Gui into servatrice.
- UrlUtils (header-only): pure URL parsing, fully unit-tested.
Wiring
- MainWindow::handleUrl(QString) — single entry point for any URL source.
- DlgConnect::prefillNewHost(host, port) — pre-fills new-host inputs.
- ServersSettings::findSavedCredsByHostPort — case-insensitive saved-creds
lookup.
- TabSupervisor::requestJoinRoom + roomJoinedById / roomJoinFailedById signals,
TabServer::roomAlreadyJoined for the short-circuit "already in this room"
path — single source of truth for duplicate-join handling.
Tests
- 36 new unit tests across four single-purpose targets in tests/:
- url_utils_test (22 tests) — scheme matching, port/room/game validation,
spectator flag, credentials ignored, case-insensitivity.
- url_scheme_event_filter_test (3 tests) — QFileOpenEvent capture.
- intent_test (7 tests) — self-delete, abort propagation, parent-destruction-
mid-flight, finish-once gate, execute() idempotence.
- single_instance_manager_test (4 tests) — per-user socket naming, becoming-
primary alone, forwarding to an existing primary, single-emission of
roleResolved.
Build tooling (incidental)
- Dockerfile.format, docker-compose.format.yml, Makefile — a docker-based
runner for format.sh that mirrors CI's desktop-lint step.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Refactor vertical card stacking with opt-in overflow for variable zone sizes
Introduce a shared vertical stacking layout system in SelectZone that replaces the old divideCardSpaceInZone() free function with structured layout computation (StackLayoutParams, ZoneLayout, computeZoneLayout).
By default, cards are guaranteed to fit within zone bounds (no overflow). Zones can opt-in to bottom overflow via allowBottomOverflow flag, with sqrt-scaled compression for smooth visual transitions. A clip container mechanism is available for future zones that need visual clipping.
Key changes:
- SelectZone: new layout engine with allowBottomOverflow opt-in; clip container infrastructure for future zones needing visual clipping
- StackZone: uses new layout (no overflow); adds setHeight() for dynamic resizing capabilities
- HandZone: vertical layout delegates to SelectZone's shared stacking
- AbstractCardItem: preserves hover z-value during layout passes; invalidates scene rect on hover exit for proper sibling repainting
- CardZone::onCardAdded made virtual for clip container reparenting
- Zone widths updated to CardDimensions::WIDTH_F * 1.5
* Changed anonymous namespace for static and braced functions
* CI tests re-run
* Pull client networking out of window_main and into remote_connection_controller
Took 2 minutes
* Things.
Took 13 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Bump minimum_required to 3.5 and GoogleTest to 1.12
GoogleTest 1.12 is the oldest version that sets cmake_minimum_required() to 3.5 in the CMakeLists files it provides
* code style changes
* Use 1.17.0
* Set minimum to 3.10 to make top-level CMakeLists
* New hash
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* Update cmake/gtest-CMakeLists.txt.in
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
---------
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
The webclient has been extracted to https://github.com/seavor/Webatrice
and the Playwright e2e suite has moved to Sockatrice. Cockatrice keeps
no copy.
Deleted:
- webclient/ (entire tree, 349 files)
- .github/workflows/web-build.yml, web-lint.yml
- .husky/pre-commit (the only tracked husky hook; managed entirely
from webclient's package.json which no longer exists)
Edited:
- .tx/config: dropped the webclient resource block; Webatrice/.tx/config
now manages its own translations
- .github/workflows/translations-pull.yml: removed webclient locales
from add-paths
- .github/workflows/desktop-build.yml, desktop-lint.yml: removed dead
'!webclient/**' and '!.husky/**' path-filter exclusions
- .github/dependabot.yml: removed commented-out npm/webclient block
- Doxyfile: removed webclient/ from EXCLUDE list
- .ci/release_template.md: dropped Webatrice section (Webatrice now
cuts its own releases)
- README.md: dropped 'first work on a webclient' line, added Webatrice
to Related Repositories, updated translation paragraph and build
badges
History preserved: every webclient commit remains recoverable via
git log on master before this commit.
* Use Qt 6.10.*
Took 3 hours 1 minute
* Remove workaround.
Took 10 minutes
* Pin to 6.11.0 for now.
Took 3 minutes
* Revert "Remove workaround."
This reverts commit 71584d1e50.
Took 4 seconds
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Utility method to check if a theme is supposed to be in dark or light mode.
Took 22 minutes
Took 4 seconds
* Method is public.
Took 3 minutes
* Add a utility method to check if we're using a built-in theme
Took 3 minutes
Took 3 seconds
* Use built-in theme detection for home screen.
Took 6 minutes
* Re-polish on theme change
Took 2 minutes
* Fetch background on theme change.
Took 4 minutes
Took 6 seconds
* No need to double polish.
Took 4 minutes
* No need to repaint.
Took 32 seconds
* Only repolish visible widgets.
Took 5 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Reload card db and notify enabled sets change on "Manage Sets" dialog save
Took 1 hour 18 minutes
Took 6 seconds
* Extract to method, also notify on "Reload db" and "new sets found"
Took 3 minutes
Took 4 seconds
* Add an "always enable new sets" fuse to "new sets found" dialog
Took 11 minutes
* Always debounce modelDirty() with dirty() timer.
Took 29 minutes
Took 3 minutes
* Performance improvements for settings by not constructing a new settings object on every single set() call (this forced a sync to/from fs but it seems fine to just rely on Qts own periodic sync?)
Took 23 minutes
Took 3 seconds
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Do not allow users to remove VDE functionality by closing tabs.
Took 6 minutes
* Set filter toolbar visible on delayed initialization.
Took 5 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Fix#6659: Correct logging for bottom-of-library card moves
Cause:
- This issue happens due to logic of moving the card from the top of the
deck being reused when moving from the bottom of the deck, in a way
that makes it impossible to check if the card came from the bottom.
Resolution:
- Updated the logging logic in the client for card moves.
- Added a gRPC parameter ('is_from_bottom') for card moves.
- Updates the server logic to reverse the order of the card move if the
'is_from_bottom' parameter is true.
- Added a test to show the expected behaviour of the fix.
NOTE: While the changes in this patch seem big, this is due to changing
the loop in the moveCard function to a helper function, in order to make
the bug fix change. The only change to the loop was to pass a
variable attribution to the moveCard function because it was redundant
to be in the loop.
* chore: run format on test
* refactor: new way to check if a move is from the bottom of the deck
* refactor: change isFromBottom check to static function
* update comments
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Change button colors to be palette aware.
Took 13 minutes
Took 41 seconds
Took 15 seconds
* Change button style.
Took 24 minutes
Took 4 seconds
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>