Skip to content

Version Packages - #78

Merged
seavor merged 1 commit into
masterfrom
changeset-release/master
Aug 18, 2026
Merged

Version Packages#78
seavor merged 1 commit into
masterfrom
changeset-release/master

Conversation

@seavor

@seavor seavor commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

@cockatrice/datatrice@4.4.0

Minor Changes

  • 4396583: State-layer support for the UI revamp: optimistic card moves, a segmented Cockatrice-parity message log, reveal/peek plumbing, private-chat selectors, and a batch of reducer fixes. Unit test coverage is now ~90%.

    Optimistic mutations. New store/games/optimistic.ts registry (beginOptimistic / isOptimisticPending / consumeOptimistic / rollbackOptimistic, key builders moveOpKey / attrOpKey). The cardMoved listener consumes matching pending ops so the server echo of a cross-zone move is not double-applied, reconciles server-corrected positions/ids (a cross-player table-to-table move migrates the optimistic entry to the server's new card id, preserving client-tracked fields like the owner annotation), and the wire layer rolls back on command error.

    Segmented message log. Every messageLog.ts formatter now returns a LogEntry { text, segments } (segment kinds plain/player/card/number) so the UI can style tokens individually, and classifyLogTone buckets lines into phase/turn/system/action for color-coding. Log wording is rewritten to Cockatrice-desktop parity (move lines with from-clauses and per-zone phrasing, "turns … face-down", counter totals as "now", coin-flip wording for 2-sided dice, P/T changes reported "from OLD to NEW", possessive arrow lines, translated counter names). New formatters: formatCardsRevealed, formatCardPeeked, formatCardUndoneDraw. gameMessageAppended accepts string | LogEntry.

    Reveal / zone-view plumbing. A new cardsRevealed listener detects Servatrice auto-top-reveals (suppressing chat spam and the dialog, tracking a persistent topRevealedCard per zone), logs peeks per card, and dispatches a new incomingReveal state slot (+ getIncomingReveal selector) when another player reveals cards to you. Reversed (bottom-N) library views now index correctly (zoneViewRevealed carries isReversed; reveal ids offset by cardCount − N), hidden bottom-view drags reorder within the snapshot, and a cross-zone move into a viewed zone inserts into it (zoneViewCardInserted). PlayerEntry gains drawSeq / lastDrawCount (draw beacon), with a drawBeaconBumped action.

    New server selectors for the revamped UI: getPrivateMessagesForUser (conversations keyed by the other user's name — backs private chats), getIsUserAdmin, getBanHistoryByUser, getWarnHistoryByUser, getAdminNotesByUser.

    Fixes.

    • Bulk untap-all now skips cards flagged "doesn't untap", matching the server's rule.
    • Orphan arrows no longer block new arrows after a cross-player move (arrow sweep now also runs on same-zone cross-player moves).
    • Moving a card to the stack keeps its annotation (resetCardState gains a keep-annotations carve-out); all other non-table zones still clear it.
    • A stale top-card face no longer lingers on a pile after a draw, a move from the top, or a shuffle.
    • An opponent's undo-draw is now logged for observers (cardMoved carries isUndoDraw, detected from the event context) instead of being swallowed by the hidden-card early return.

    Note: zoneViewRevealed (action payload and GameResponseImpl bridge method) gains a required isReversed argument, and cardMoved an optional isUndoDraw.

@cockatrice/sockatrice@4.2.0

Minor Changes

  • 4396583: Protocol-layer additions for the UI revamp: a heterogeneous bulk counter command, per-command options plumbing, undo-draw detection, reversed zone-view support, and a sanitizer robustness fix.

    • New request.game.bulkSetCardCounterEntries (+ exported CardCounterEntry type): batches per-card Command_SetCardCounter entries with heterogeneous (cardId, counterId, counterValue) values into a single CommandContainer, judge-wrapped per card owner — unlike bulkSetCardCounter, which applies one value to every target. Backs the "increment all card counters" context-menu action (Cockatrice actIncrementAllCardCounters parity).
    • Command options plumbing. moveCard, setCardAttr, incCardCounter, setCardCounter, incCounter, setCounter, setActivePhase, and createArrow gain a trailing optional options parameter (spread into sendGameCommand), so callers can attach command options — e.g. grouping actions into one undo step — that previously had no way through. Backward-compatible.
    • Undo-draw detection. The moveCard event handler inspects the event context for Context_UndoDraw_ext and passes a new optional isUndoDraw flag to IGameResponse.cardMoved, letting consumers log "undoes their last draw" instead of a generic move.
    • Reversed zone views. dumpZone now forwards the request's isReversed flag into the zoneViewRevealed response callback (new required parameter on IGameResponse.zoneViewRevealed), so bottom-N library views preserve their ordering direction.
    • Fix: sanitizeHtml no longer breaks when imported before a window exists (worker / test import order). DOMPurify is now created lazily and memoized on first use, the link hook (target="_blank" + rel="noopener noreferrer") registers defensively, and if no real instance is available the input is returned unmodified rather than throwing.

@cockatrice/webatrice@5.0.0

Major Changes

  • 4396583: Ground-up UI revamp ("sonic"): a new visual system, a rewritten game board and navigation, plus a full deck editor, private chats, in-game context menus, and a greatly expanded shortcut system.

    New styling engine and theme. MUI's ThemeProvider / CssBaseline and material-theme.ts are gone; Tailwind CSS 3.4 (+ PostCSS/autoprefixer) provides the styling layer, with a dark purple design-token palette (styles/tokens.css mapped to Tailwind utilities) and lucide-react iconography. The MUI components still in use are reskinned via styles/mui-overrides.css; InputField, CheckboxField, and Toast are now custom Tailwind components. The app is dark-only.

    Tabbed top navigation. A new browser-style TopBar derives tabs from route + store state: a pinned Lobby tab plus tabs for joined rooms, active games, the open deck, shortcuts, and player chats. Closing a room/game tab sends the leave command; deck/shortcut/player tabs are sticky so open work survives navigation. An F5 refresh restores the last route via localStorage (MemoryRouter has no URL bar).

    Game board rewrite. The right-sidebar architecture (RightPanel, CardPreview, GameLog, PhaseBar, TurnControls) is deleted, replaced by the PlayerBox component tree with a BattlefieldSidebar right rail (hovered-card preview, player list, chat), a PhaseTrack, a rewritten arrow overlay, and a new pre-game GameLobby (deck picking from .cod, ready/host controls, spectators). The chat log renders datatrice's new segmented log entries with per-token styling and tone-based coloring. New in-game affordances: drag drop hints (the target snap cell highlights during a drag, scoped to the board you're over), an optional snap-grid overlay toggle, battlefield card transform/flip-face support, ZoneRevealDialog / IncomingRevealDialog / LibrarySearchDialog, and a middle-click big-card zoom.

    In-game context menus. A portal-based ContextMenu (dividers, checkable items, shortcut hints, nested submenus) is wired across cards, the battlefield/library/graveyard/hand/exile zones, player seats, and the player list — card actions, move-to-zone, counters, P/T, flip, clone, peek, attach, and moderation/seat actions.

    Full deck editor. features/decks is net-new (the previous page was a stub): a card-search editor backed by Scryfall (read-through Dexie cache, new scryfallCache table in DB v4), .cod XML parse/serialize with autosave to servatrice, mana-curve/type/color breakdowns, printings, pricing with TCGplayer buy links, Commander bracket assessment, import from decklist text, and an export modal. Decks are cached in-memory across tab switches; the My Decks card/list view mode persists to localStorage. The deck route is now /deck/:deckId (was /deck).

    Related cards. CardRelatedLinks shows a card's other faces, tokens, meld pieces, and combo pieces (from Scryfall card_faces/all_parts) in the right-rail preview, the big-card zoom, and the deck editor's card detail modal — with add-to-deck affordances where applicable.

    Private chats. The player profile page is now a two-column layout with a private-chat panel driven by Command_Message / Event_UserMessage. Chats open from a right-click UserActionsMenu on any username (chat messages, player lists); open conversations persist as sticky TopBar tabs, and a global PrivateMessageNotifier pops a toast for new inbound messages (suppressed while viewing that sender).

    Keyboard shortcuts. Default game shortcuts grow from 16 to 71 actions, mirroring Cockatrice desktop where browser-safe (untap-all is Ctrl+U, not F5; other Chromium-reserved keys rebound). Coverage spans phases/turn, draw/mulligan, zone views, P/T deltas, card counters, selection, clone/flip/peek/attach, arrows, tokens, and deck-editor/room bindings. A new /shortcuts page (from the account menu) shows visual keycaps.

    Fixes from play-testing: battlefield drag/move correctness backed by datatrice's new optimistic-move handling (no flicker/revert), big-card preview rework, .cod/decklist parser hardening (cards without UUIDs still resolve and price), Chrome autofill styling, and reveal/search dialog behavior.

    Breaking changes: the deck editor route moved to /deck/:deckId; the light MUI theme is gone (dark purple only); the in-game right-sidebar layout is replaced wholesale; several shortcuts differ from Cockatrice desktop; the deck editor calls Scryfall and links to TCGplayer.

Patch Changes

  • Updated dependencies [4396583]
  • Updated dependencies [4396583]
    • @cockatrice/datatrice@4.4.0
    • @cockatrice/sockatrice@4.2.0

@seavor
seavor merged commit 5b50ce0 into master Aug 18, 2026
8 checks passed
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