Rishabh060105/fix pr878 data rebuild#881
Conversation
✅ Deploy Preview for ap-template-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
56b78a7 to
f3465de
Compare
|
Update on the latest changes:
Validation completed locally:
The only remaining blockers shown are maintainer/code-owner review and workflow approvals for the required GitHub Actions checks. |
|
@dselman could you you go through this PR and suggest if any changes are needed? |
Thanks for all the fixes and enhancements @Rishabh060105 . Please have your PR target the branch |
459a4e8 to
75c345c
Compare
|
@mttrbrts I’ve now retargeted this PR to The remaining changes in this PR are scoped to:
DCO is now passing on the latest head. If needed, the remaining checks may need to be re-triggered/approved against the updated PR base and head. |
Retry TipTap template parsing when external sample or shared-link loads receive the rebuilt modelManager, so the rich editor does not get stuck on stale model state. Also store rebuilt html/modelManager after JSON data edits and split Vitest config from vite.config.ts so CI can load the production Vite config cleanly. Signed-off-by: Rishabh060105 <rishabhj2005@email.com>
75c345c to
8f4daa3
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes a synchronization race between externally loaded templates (samples/share links) and the TipTap rich editor by ensuring the editor reparses markdown when the rebuilt modelManager arrives, and it corrects store state updates so agreementHtml remains a string after data-driven rebuilds.
Changes:
- Add a pending “retry parse when modelManager updates” mechanism in
TiptapTemplateEditorfor external template loads. - Clear pending retries for edits originating from the rich editor to avoid unnecessary re-parses during normal editing.
- Fix
setDatato store{ html, modelManager }outputs correctly instead of assigning the whole rebuild result object intoagreementHtml. - Split Vitest config out of
vite.config.tsintovitest.config.ts.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
vitest.config.ts |
Introduces a dedicated Vitest config merged with the Vite config. |
vite.config.ts |
Removes embedded Vitest configuration; exports only Vite build/dev config. |
src/store/store.ts |
Fixes setData rebuild state assignment to keep agreementHtml as a string and update modelManager. |
src/editors/TiptapTemplateEditor.tsx |
Adds modelManager-aware reparse retry logic to resolve external-load synchronization issues. |
Signed-off-by: Rishabh060105 <rishabhj2005@email.com>
|
Hi @mttrbrts, I addressed the Copilot feedback with focused regression tests for both fixes in this PR. Added:
These verify:
Validation run:
|
mttrbrts
left a comment
There was a problem hiding this comment.
Thanks for the fix @Rishabh060105 !
Closes N/A
Fixes rich editor synchronization after externally loaded templates are rebuilt with a new
modelManager.This PR addresses a PR #878 review finding where the TipTap rich editor could parse a newly loaded sample or shared-link template before the matching
modelManagerwas available, then ignore the latermodelManagerupdate because the markdown text itself had not changed.Changes
src/editors/TiptapTemplateEditor.tsxto retry parsing externally loaded template markdown when the rebuiltmodelManagerarrives.src/store/store.tsso JSON data edits store the rebuilt HTML string andmodelManagerinstead of assigning the full rebuild result object toagreementHtml.Flags
npm cihung in the main workspace.Screenshots or Video
N/A - this is a state synchronization fix. The behavior is covered by unit test verification rather than a visual UI change.
Related Issues
Author Checklist
--signoffoption of git commit.mainfromfork:branchname