Unsaved DMN edits are lost when switching check editor tabs
维护者通常 1 天内回复
@sahilds1 已经在做这个了。
开始于 2026年10月29日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- frontend
调研方向
Start with CustomCheckDetail, KogitoDmnEditorView, and openDmnEditor to trace the DMN editor's mount and unmount behavior. Check how currentDmnModel and eligibilityCheck().dmnModel are updated when switching tabs or leaving the editor. Done means unsaved DMN edits survive tab switches, and leaving with unsaved changes warns the user where applicable.
由索引模型根据 Issue 内容生成。
描述
Problem
In the custom check editor, unsaved edits in the DMN editor are silently lost when the user switches to another tab and comes back.
Steps to reproduce
- Open a custom check and go to the DMN Definition tab.
- Edit the model. Don't click Save Changes.
- Switch to another tab, such as Testing, then back to DMN Definition.
Expected: the edits are still there, or the app warns before they are discarded.
Actual: the editor shows the last saved model and the edits are gone, with no warning.
Cause
CustomCheckDetail renders the tabs in a Switch/Match, so leaving the DMN tab unmounts KogitoDmnEditorView. When it remounts, openDmnEditor seeds the editor with the saved eligibilityCheck().dmnModel and calls onDmnModelChange with that model, which overwrites currentDmnModel (the only copy of the edits).
Leaving the check editor entirely (breadcrumbs, main navigation, closing the tab) also discards unsaved edits without a warning. The app has no useBeforeLeave or beforeunload guard.
Possible fixes
- Seed a remounted editor from
currentDmnModelwhen it differs from the saved model, so edits survive tab switches. - Or keep the editor mounted and hide it while other tabs are shown.
- Warn before leaving the page with unsaved edits (
useBeforeLeavefrom@solidjs/routerplusbeforeunload).
Related
Branch 523-clarify-check-renaming-and-streamline-the-publishing-workflow adds a warning on the Publish tab with a Save DMN edits button. That covers the Publish tab only, not the general loss on tab switches.
- 主要语言
- Java
- 星标
- 16
- 派生
- 5
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 16
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeForPhilly/benefit-decision-toolkit 的其他 Issue
-
Don't show library benefits in picker that have already been added to the screener可能已有人在做 @sahilds1 于 5 天前认领。 未关闭frontend Good for newcomer quick win
难度 2/5 1-3 小时 新手友好度 65/100
CodeForPhilly/benefit-decision-toolkit#571 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
CodeForPhilly/benefit-decision-toolkit#565 ·
维护者通常 1 天内回复
-
documentation quick win
难度 2/5 1-3 小时 新手友好度 68/100
CodeForPhilly/benefit-decision-toolkit#445 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
CodeForPhilly/benefit-decision-toolkit#425 ·
维护者通常 1 天内回复
-
Browser refresh should return to the same screen/tab可能已有人在做 @sahilds1 于 5 天前认领。 未关闭frontend Good for newcomer quick win
CodeForPhilly/benefit-decision-toolkit#581 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 CodeForPhilly/benefit-decision-toolkit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
Dans-Plugins/Medieval-Roleplay-Engine#396 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 6 天内回复
-
type: dependency-upgrade
难度 1/5 1 小时以内 新手友好度 70/100
spring-projects/spring-session#4156 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
quarkiverse/quarkus-langchain4j#3127 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
HotswapProjects/HotswapAgent#688 ·