Skip to content

Allow storing preferences in mirabuf files and refactor preferences system [SYNTH-194] and [SYNTH-190] - #1371

Merged
PepperLola merged 30 commits into
devfrom
zachr/190/mira-config
Jul 9, 2026
Merged

Allow storing preferences in mirabuf files and refactor preferences system [SYNTH-194] and [SYNTH-190]#1371
PepperLola merged 30 commits into
devfrom
zachr/190/mira-config

Conversation

@rutmanz

@rutmanz rutmanz commented Jul 1, 2026

Copy link
Copy Markdown
Member

Task

SYNTH-194
SYNTH-190
SYNTH-118

Symptom & Solution

For 194:

  • user preferences (not related to robot or field) are stored as top level keys and called global preferences. This is weird from a data structure perspective (especially bc we iterate over them), and this PR moves those to a "User" object
  • Remove motor preferences (they are unused)
  • Automatic migration of old preferences
  • Use mira hashes rather than model name as preference keys.

For 190:

  • Remove devtools panel (this was just used for exporting updated mira models, which is now in the configure panel)
  • Automatically migrate old stored metadata
  • Store all preferences (linked joints, drivetrain properties, etc) instead of just specific types so that one student can configure the robot and share it easily with all teammates.
  • Add metadata configuration page to allow students to rename assets. As we try more and more to de-emphasize the exporter, this will let them customize things
image

For 118:

  • Update all robot models to include sensible defaults

Verification

  • Run bun run assetpack to get the new models
  • Import an older dozer with configured stuff (Dozer v10 from the old assetpack) to check migration
  • Try making changes, exporting, and importing into a private window, see configuration still there
  • Make sure that user-modified preferences aren't overwritten

Before merging, ensure the following criteria are met:

  • All acceptance criteria outlined in the ticket are met.
  • Necessary test cases have been added and updated.
  • A feature toggle or safe disable path has been added (if applicable).
  • User-facing polish:
    • Ask: "Is this ready-looking?"
  • Cross-linking between Jira and GitHub:
    • PR links to the relevant Jira issue.
    • Jira ticket has a comment referencing this PR.

@rutmanz
rutmanz force-pushed the zachr/190/mira-config branch from 6e3720b to 5bee5e4 Compare July 2, 2026 20:08
@rutmanz rutmanz self-assigned this Jul 2, 2026
@rutmanz rutmanz added ui/ux Relating to user interface, or in general, user experience mirabuf Relating to the mirabuf format refactor The most important part of software development. labels Jul 2, 2026
@rutmanz

rutmanz commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

I'm working on getting the checks to pass but this PR is ready for review

@rutmanz
rutmanz marked this pull request as ready for review July 2, 2026 20:11
@rutmanz
rutmanz requested review from a team as code owners July 2, 2026 20:11
@autodesk-chorus

Copy link
Copy Markdown

Chorus detected one or more security issues with this pull request. See the Checks tab for more details.

As a reminder, please follow the secure code review process as part of the Secure Coding Trust Commitment requirement.

@rutmanz
rutmanz force-pushed the zachr/190/mira-config branch from ebf382b to ab4a4bf Compare July 3, 2026 18:21
Comment thread fission/bun.lock

@rutmanz rutmanz Jul 3, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azaleacolburn do you have any ideas for a long term solution to the autodesk registry getting added to the lockfile?

@rutmanz
rutmanz requested a review from azaleacolburn July 8, 2026 15:47
Comment thread fission/src/systems/preferences/PreferencesSystem.ts Outdated
Comment thread fission/src/mirabuf/MirabufSceneObject.ts Outdated
@rutmanz
rutmanz requested a review from Dhruv-0-Arora July 8, 2026 21:52
@PepperLola
PepperLola requested a review from Copilot July 8, 2026 23:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 71 out of 71 changed files in this pull request and generated 13 comments.

Comment thread fission/src/test/mirabuf/MirabufLoader.test.ts Outdated
Comment thread fission/src/test/mirabuf/MirabufLoader.test.ts Outdated
Comment thread fission/src/test/mirabuf/MirabufLoader.test.ts Outdated
Comment thread fission/tsconfig.node.json
Comment thread fission/tsconfig.json
Comment thread fission/src/mirabuf/MirabufSceneObject.ts Outdated
Comment thread fission/src/ui/panels/DeveloperToolPanel.tsx
Comment thread fission/src/ui/panels/DeveloperToolPanel.tsx Outdated
Comment thread fission/src/ui/panels/DeveloperToolPanel.tsx

@azaleacolburn azaleacolburn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few suggestions, feel free to ignore :3

Comment on lines +899 to +913
if (this.miraType === MiraType.FIELD && !PreferencesSystem.hasFieldPreferences(this.assemblyId)) {
this._fieldPreferences = defaultFieldPreferences()
editor.migrateDevtoolFieldData(this._fieldPreferences)
this._fieldPreferences = {
...this._fieldPreferences,
...editor.getUserData("synthesis:field_preferences"),
}
} else if (this.miraType === MiraType.ROBOT && !PreferencesSystem.hasRobotPreferences(this.assemblyId)) {
this._robotPreferences = defaultRobotPreferences()
editor.migrateDevtoolRobotData(this._robotPreferences)
this._robotPreferences = {
...this._robotPreferences,
...editor.getUserData("synthesis:robot_preferences"),
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pedantic, but:

  1. I think using the satisfies operator on every object literal would be a good practice.
  2. This section is hard for me to read for some reason and I think some whitespace would be helpful, especially before the preferences objects get created.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I don't like the amount of repeated structure within this function and within resetPreferences().

I could imagine a really cool solution where some function matches a set of functions, properties, and strings against an enum and then always runs the same structure of statements just with those variable arguments and functions. However, this would probably be unreadable.

If you have any (better) ideas about how to reduce repeated structure here, I would appreciate it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it could be better but the typing is really obnoxious and I would prefer to make that refactor a separate ticket if you think it's important

Comment thread fission/src/mirabuf/MirabufSceneObject.ts
Comment thread fission/src/systems/preferences/PreferencesSystem.ts Outdated
Comment thread fission/src/ui/panels/configuring/assembly-config/configure/AssemblyExport.tsx Outdated
Comment thread fission/src/ui/panels/DeveloperToolPanel.tsx Outdated
Comment thread fission/src/util/Utility.ts
@rutmanz
rutmanz requested a review from azaleacolburn July 9, 2026 17:33

@azaleacolburn azaleacolburn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woaw

@Dhruv-0-Arora Dhruv-0-Arora left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@AlexD717 AlexD717 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I add a scoring/protected zone, then click reset (in the configure panel), it doesn't immediately remove that added zone until I either respawn the asset again or enter into the configuration menu.

The toast popup should either tell users they need to respawn it for changes to take effect, or it should immediately update.

@rutmanz rutmanz mentioned this pull request Jul 9, 2026
5 tasks
@rutmanz
rutmanz requested a review from AlexD717 July 9, 2026 22:43

@AlexD717 AlexD717 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@PepperLola
PepperLola merged commit 58e0c2d into dev Jul 9, 2026
16 checks passed
@PepperLola
PepperLola deleted the zachr/190/mira-config branch July 9, 2026 23:30
@PepperLola PepperLola mentioned this pull request Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mirabuf Relating to the mirabuf format refactor The most important part of software development. ui/ux Relating to user interface, or in general, user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants