Skip to content

macOS: Export, Import Core Rules 2.0, New Package and Edit Package (step 3, phase 4, stage 8) - #133

Merged
brahm merged 34 commits into
mainfrom
claude/project-thread-wd4xxt
Oct 29, 2026
Merged

brahm merged 34 commits into
mainfrom
claude/project-thread-wd4xxt

Conversation

@brahm

@brahm brahm commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

This adds package support to the macOS app.

Bridge (packages.rs)

  • ExportSession offers the user's records and characters, grouped by category. Items can be checked one by one or with Select All. export(path) writes the checked items to a new package.
  • PackageSession edits a package. It lists the items by category, removes one by id, and adds the items checked in an ExportSession (Add Items). save(path) saves it, asking for a path only when the package is new.
  • Library gains:
    • exportable
    • new_package
    • edit_package, which returns the editor, or an explanation when the package was made by Core Rules 2.0, since those are only imported
    • import_core20(folder), which feeds the existing Import… sheet and returns none when the installation has nothing of its own
  • Adds HelpScreen::Export.

Swift (Packages.swift)

  • An Export sheet.
  • A package editor sheet. Its Add Items opens a second chooser sheet over it, and it asks before discarding changes to a saved package.
  • New File menu items: Import Core Rules 2.0… (Expansion only), Export…, New Package… and Edit Package….

Other

  • EXPORT, IMPORT_CORE20, NEW_PACKAGE and EDIT_PACKAGE are removed from NOT_YET_ON_MACOS. Only EXTRACT_DATA is left.
  • The roadmap is updated.
  • There are no new texts to translate.

Checks

  • cargo fmt passes.
  • cargo clippy -D warnings and cargo test pass on cr-app, cr-mac-ffi and cr-i18n.
  • The Swift code is only compiled in the macOS CI job; it hasn't been built here.

Generated by Claude Code

claude added 30 commits October 29, 2026 14:03
The Mac app in macos/CoreRules, in SwiftUI, with the scope of the
Windows prototype: the library in three columns with its search, the
first page of New Character, the character's description in Edit
Character, Delete with its confirmation, Import… of a package (also
from the Finder), the sheet printed, saved as PDF and exported, and
Settings with the language.

cr-mac-ffi gains the wizard, the editor and the import as sessions over
cr-app's state machines, the sheet as PDF and exports, and Delete.
The translation extraction reads the Swift sources too; one new text.
macos/scripts/make-app.sh builds Core Rules.app with swiftc, signs it
ad hoc and packs the .dmg, which CI builds and keeps.
NOT_YET_ON_MACOS loses the ten actions the prototype has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
The main window's body was too large for the type checker; each part is
a view of its own now, with typed bindings. SwiftUI's Group is named in
full where the bridge's Group would shadow it, and the number fields
take an explicit UInt32 format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
The weapons section draws the sword the GNOME and Windows apps draw,
which SF Symbols lacks, instead of a hammer. Read Me First leads with
removing the quarantine in Terminal, which opens the app where Open
Anyway is not offered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
cr-mac-ffi gains the library's filters (origin, party, part type, Magic
Only), the commands an entry offers, the items' icons and the pictures
(a monster type's frames, Full Screen), Convert to Character and to
NPC, and the sheet as a session: a character's sheet or the page of an
encounter, table, template or treasure, its PDF, exports and Character
Sheet Options.

The Mac app filters the list, shows those pictures and Core Rules 2.0
as read-only, and opens a sheet in a window of its own: the PDF it
prints, in PDFKit, with Print, Save as PDF, Export and Character Sheet
Options. The menu bar's Print and Save act on the sheet's window in
front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
The help in a window of its own with its books, search, links, popups,
Back and Print; Help on the screen in front, on the entry in view and on
a monster; About with What's New, Credits, Legal and Troubleshooting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Read Book opens a book in a window of its own, with its contents, Find,
zoom and the reading position kept between sessions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Every page of the wizard, described by the bridge as a form and drawn by
one SwiftUI view; its questions, Choose Portrait, Enter Character's
Levels, and Create.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Describe each page of cr_app::editor as a form, as the Windows app's Edit
Character draws it: Details (with Add Class, Levels… and Add…),
Abilities, Combat, Proficiencies, Skills (with Test and Roll for wild
talents), Spells and Equipment (with the items' icons). The Swift sheet
picks the page with a segmented control and draws it with FormView.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Describe the NPC generator's forms as forms in a sheet, whose Create makes
and saves the NPCs off the main thread, and give Roll on a Table a window
of its own with Roll, Roll Again, Copy Results and Read in Book. The
generators share the random numbers and what the tables leave for the
next roll, kept by the library. They are in a new Tools menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Describe the treasure roller as a form in a window of its own: the
treasure types, Accumulate Rolls and the coin, the treasure as a tree
with each item's Remove, Move Into and Edit Spells, the bundle editor's
dialogs, and the Calculate summary. The toolbar rolls, resets, saves,
prints, saves as PDF and deletes the saved treasure; Edit and Copy open
a saved treasure from the library, and Roll on a Table opens the roller
where the roll says to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
The encounter in a window of its own: New Encounter's templates, then
the Encounter page of cr_app::encounter described as a form, with its
packages, hit points, pickers, items, treasure (Roll Treasure opens the
roller with Use Treasure), traps, Save, Print, Save as PDF and Delete.
The 2-20 table editor in another window, with Fill, Roll and the
roll's template dialog. Edit, Copy and Create Encounter on the saved
encounters, tables and templates in the library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Manage Parties in a sheet: the lists of cr_app::parties described as a
form, with the party chosen, New Party, the buttons that move each
character, Delete Members and Group Encounter's dialog, which opens the
encounter of the party's NPCs or prints or shows their page. Labels of
the catalogs lose their mnemonic in the forms' rows too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
RecordSession describes each page of cr_app::records::form as a form,
every kind of field drawn (with new rows for dice, tables of numbers by
level and pictures), with the dialogs its fields open, its questions,
Choose Picture and Save. The Mac app edits a record in a sheet: New in
the list's toolbar and the File menu, Edit, Copy, New Subrace,
Schools… and Delete on a record, New Part asking for the type, and New
Trap, New Monster and the traps' Edit, Copy and Delete from the
encounter's pickers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
The record sheet now edits a treasure table and a race's Allowed
Classes as well as a record: RecordSession holds one of the three
editors, each described as a form, the table's entry details and
"How many to remove?" in a dialog over it. Allowed Classes… and
Restore join the record's More menu, Restore asked first, and leave
the list of actions not yet on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
The record sheet edits an encounter template too: its seven pages
described as forms, and in a dialog over them a line's Properties, the
monster, item and trap pickers, the numbers of a monster that comes
with an item, and NPC Creation in template mode, whose Add to Template
hands the NPC to the template. Every section of the user databases is
now edited on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
Export… checks the user's records and characters by category and
writes them to a new package; New Package… and Edit Package… open the
package editor in a sheet, with its items by category, Remove, Add
Items and Save; Import Core Rules 2.0… reads the folder of a Core Rules
2.0 installation into the Import… sheet. All four are in the File menu
and leave the list of actions not yet on macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiPLVTLx5V4CMD9nZUR12R
@brahm
brahm merged commit 3adc06b into main Oct 29, 2026
3 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.

2 participants