fix(harmonia): detail-panel child forms open in the iframe dialog — parent form keeps its unsaved state (#6509) - #6509
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.harmonia.entity.updatedmessage (baseFormPage.emitSaved); therelatedstore routescreatedandupdatedthrough the same close-and-callback path. A preview's Edit button stays inside the dialog (goEditcarries the dialog mode), so its save also reports to the opener.returnToplumbing (detail register + panel) is removed — nothing navigates anymore.Deployment note: the shared-runtime half (
detailPanel.js,related.js,baseFormPage.jsinapplication-core) takes effect with the platform jar alone; the generated form page'semitSavedbranch 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 sinceemitCreatedpredates this).Test
IntentEngineITemission locks: the generated detail register carries noreturnTo, and the generated form page contains the dialog-modethis.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