Skip to content

Conversation

@benflexcompute
Copy link
Collaborator

@benflexcompute benflexcompute commented Nov 30, 2025

Remaining stuff to be done:
[MIRROR]:

  • Discussing with mesher team what they prefer for reading mirroring info.
  • Interaction of the CS with mirroring (reflected in the matrix or what?)
  • [Refactor] How about grouping all mirror stuff into a single class like did in CS?
  • Interfaces: Retrieval, set, delete, check etc.
  • Handling of the draft entities. Maybe we do not have to do this in this version? This depends on how much DraftContext we want to roll out in 25.8 though. I think we should add it but we will see in terms of how many days are left...
  • End to end testing.

[COORDINATE SYSTEM]:

  • Translator to get the matrix into mesher.
  • Post processing related (projection)
  • Supporting many other types, seems only GeometryBodyGroup works for now. But do we really need this for features like PM? I did not see it anywhere in PRD? Also can we just cut scope for now? Non-geometry body group ones are difficult (like shifting slices around)
  • End to end testing. (including interface optimization if needed)

@benflexcompute benflexcompute marked this pull request as draft November 30, 2025 15:30
@benflexcompute
Copy link
Collaborator Author

@codex review the PR

@benflexcompute benflexcompute marked this pull request as ready for review November 30, 2025 19:19
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 161 to 167
def _load_mirror_status_from_asset(asset: AssetBase) -> Optional[MirrorStatus]:
"""Get the mirror status from the asset"""

mirror_status_dict = (
# pylint: disable=protected-access
AssetBase._get_simulation_json(asset=asset, clean_front_end_keys=True)
.get("private_attribute_asset_cache", {})

Choose a reason for hiding this comment

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

P1 Badge Guard mirror-status fetch for local drafts

Creating a draft from a locally instantiated asset (id is None, e.g., surface/volume meshes loaded from disk) now fails before entering the context because _load_mirror_status_from_asset unconditionally calls AssetBase._get_simulation_json, which requires _webapi to be present. Local assets never set _webapi, so this path raises an AttributeError instead of returning a DraftContext, breaking with create_draft(new_run_from=SurfaceMeshV2(id=None)) and the new mock_surface_mesh test fixture. Please skip the mirror-status fetch or short-circuit when the asset has no web API connection.

Useful? React with 👍 / 👎.

@benflexcompute
Copy link
Collaborator Author

@codex review again!

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +151 to +155
if entity_info is None:
raise Flow360RuntimeError(
"[Internal] DraftContext requires `entity_info` to initialize."
)
self._token: Optional[Token] = None

Choose a reason for hiding this comment

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

P1 Badge Allow DraftContext to set _token

The class defines __slots__ without _token, but the constructor assigns self._token a few lines below (line 155). Because slotted classes disallow attributes not listed in __slots__, constructing a DraftContext (e.g., via create_draft(...)) will immediately raise AttributeError: 'DraftContext' object has no attribute '_token', so none of the draft or mirroring logic can run.

Useful? React with 👍 / 👎.

* 1. Added CS model

* 2. Added inheritance support of CDSs

* Refactor draft coordinate systems into dedicated manager

* Add coordinate system status serialization and manager integration
@benflexcompute benflexcompute changed the title [FXC-3495] Mirroring interface and draft context manager. [FXC-3495] [SCFD-4987] Mirroring interface, coordinate system and draft context manager. Dec 2, 2025
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