Skip to content

Readable nominal type captions in shared previews - #17

Merged
trissim merged 1 commit into
mainfrom
fix/readable-preview-types
Nov 4, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/readable-preview-types

Conversation

@trissim

@trissim trissim commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

One shared preview type handler replaces Python class repr leakage; one existing name formatter handles both parameter_names and ClassNames. No per-application class roster, renamed identities, serialization change or screenshot retouching.

Before / after

Before: class-valued configuration choices fell through the generic str() branch, displaying <class 'openhcs.constants.input_source.ReadPreviousStep'>.
After: singledispatch's existing type boundary selects the canonical declaration, and FieldDisplayText renders Read Previous Step. Lazy wrapper names do not replace the original declaration. The original class and its registered/wire spelling remain unchanged.

FieldDisplayText now separates CamelCase/acronym boundaries while retaining its existing parameter-name labels. All field/checkbox/group captions still derive from that one owner. The now-unreachable type exclusion is deleted from the generic callable fallback.

Proof

32 focused tests passed: 9 new caption/type/lazy-wrapper/identity/function cases plus 23 existing shared preview/manager cases from pyqt-reactive. Run with the existing OpenHCS Python3.12 environment and pinned dependency source roots, pytest importlib mode and empty inherited addopts. No full suite or local NRA gate run.

Dependency scope

This branch starts at the exact formbridge commit pinned by current OpenHCS (3cab35a), so OpenHCS can consume its head without accidentally pulling an unrelated ObjectState5 migration. The patch is limited to two existing formatter files and its focused test file and is intended to merge into current main normally. Main's separate ObjectState API changes are not reverted.

The OpenHCS Figure1 delivery will record its exact runtime dependency commit and recapture the actual native UI. A formatter test is not presented as that capture.

Assumed: class captions are display text, not serialized identity; canonical declaration recovery remains the existing lazy-factory authority; OpenHCS's currently pinned ObjectState API remains required for its real UI capture.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 23:57

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 insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 9dab53d into main Nov 4, 2026
1 of 11 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