Skip to content

fix(harmonia): detail-panel child forms open in the iframe dialog — parent form keeps its unsaved state (#6509) - #6509

Merged
delchev merged 1 commit into
masterfrom
fix/detail-panel-dialog
Aug 4, 2026
Merged

fix(harmonia): detail-panel child forms open in the iframe dialog — parent form keeps its unsaved state (#6509)#6509
delchev merged 1 commit into
masterfrom
fix/detail-panel-dialog

Conversation

@delchev

@delchev delchev commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes #6508.

What

Adding a child record from a detail panel (a company's bank account) navigated the main pane to the child's form; returning re-mounted the parent form, which reloads from the server — every unsaved field was silently discarded. The FK combobox's "Add new" already used the right mechanism (the shared related-record iframe dialog), so the panel now uses it too:

  • detailPanel.addRow/editRow/previewRow + the calendar panel's event/day clicks open the child's own generated form page in the dialog: same SPA, ?embedded=1 (chrome hidden) + dialog=1 (save/cancel post messages instead of navigating). The master FK and clicked-date presets ride in the hash query exactly as before. On save the dialog closes and only the panel reloads — the parent form never re-mounts.
  • Dialog-mode edit saves post a new harmonia.entity.updated message (baseFormPage.emitSaved); the related store routes created and updated through the same close-and-callback path. A preview's Edit button stays inside the dialog (goEdit carries the dialog mode), so its save also reports to the opener.
  • The returnTo plumbing (detail register + panel) is removed — nothing navigates anymore.

Deployment note: the shared-runtime half (detailPanel.js, related.js, baseFormPage.js in application-core) takes effect with the platform jar alone; the generated form page's emitSaved branch needs app regeneration — until then a dialog-mode edit save falls back to navigating the iframe (create, the reported case, works with the jar alone since emitCreated predates this).

Test

IntentEngineIT emission locks: the generated detail register carries no returnTo, and the generated form page contains the dialog-mode this.emitSaved(this.id) branch. The behavioral acceptance (fill company → add bank account → fields intact) is a UI journey; the state-preserving mechanism (iframe dialog + postMessage) is the same one the FK "Add new" has used in production.

🤖 Generated with Claude Code

…log, never a main-pane navigation (#6509)

Adding or editing a composition child (a company's bank account) from
the shared detail panel navigated the main pane to the child's form and
back - re-mounting the parent form, which reloads from the server, so
every unsaved field the user had filled was silently discarded. The FK
combobox's "Add new" already had the right shape: the related-record
iframe dialog.

The detail panel's addRow/editRow/previewRow and the calendar panel's
event/day clicks now open the child's own form page in that dialog
(?embedded=1#/<Entity>/...?embedded=1&dialog=1) with the master FK
preset; on save the dialog closes and the panel reloads its rows while
the parent form keeps its state. Dialog-mode EDIT saves post the new
harmonia.entity.updated message (baseFormPage.emitSaved; the related
store routes created and updated to the same close+callback path), and
a preview's Edit stays inside the dialog. The returnTo def plumbing is
removed - nothing navigates anymore.

The shared-runtime half (detailPanel/related/baseFormPage) applies with
the platform jar alone; the generated form page's emitSaved branch and
the register's returnTo removal reach deployed apps on regeneration.

IntentEngineIT locks the emission: the detail register carries no
returnTo and the generated form page reports a dialog-mode edit save to
the opener.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@delchev
delchev merged commit 699b2ab into master Aug 4, 2026
10 checks passed
@delchev
delchev deleted the fix/detail-panel-dialog branch August 4, 2026 15:56
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.

Detail-panel child create/edit navigates the main pane, discarding the master form's unsaved edits

1 participant