[Bug] Config profile drawer discards unsaved edits when closed
Reassessment correction: the embedded ConfigPage already displays an explicit unsaved-changes indicator before the drawer is dismissed. The original description of edits being lost "silently" was inaccurate.
Dismissing the drawer unmounts the editor and does not run the route-leave confirmation. This differs from route navigation, but the available evidence does not establish that an additional blocking confirmation or draft persistence is required by the supported drawer contract. Withdrawing this defect claim because repair necessity is not established; this does not claim that the behavior changed or that a fix was merged.
The existing discussion preserves the passive-indicator versus active-confirmation distinction.
A small addition — there actually is a warning before the drawer is dismissed, so the "silently" part may need adjusting.
The three technical points in the report all check out:
ConfigProfileDrawer.vuedoes renderConfigPageunderv-if="open && configId"close()does only setopen = false, which unmounts the editorbeforeRouteLeaveonly fires on route navigation, and dismissing this overlay is not a route change, so that guard is not invoked
However, ConfigPage also carries its own unsaved-changes indicator (views/ConfigPage.vue:112-122):
<v-slide-y-reverse-transition>
<div
v-if="fetched && hasUnsavedChanges"
class="unsaved-changes-pill"
role="status"
aria-live="polite"
>
<v-icon size="18">mdi-alert-circle-outline</v-icon>
<span>{{ tm('messages.unsavedChangesNotice') }}</span>
</div>
</v-slide-y-reverse-transition>
The en-US text is "Unsaved. Click the button in the bottom-right corner to save." (zh-CN: "尚未保存,点击右下角按钮以保存。"). Its style is position: fixed (same file, :1123), anchored to the viewport, so it is visible inside the drawer as well. As long as the editor is loaded and dirty, this indicator appears — confirmed in both locales.
The same indicator also appears in other entries that embed ConfigPage (e.g. the "Config File Management" view).
In other words, the edits are not discarded with no indication — there is an explicit unsaved state shown at the bottom left of the page before the drawer is closed.
That said, one thing is still worth discussing: this indicator is a passive status display. It says "not saved yet" but does not block dismissal, whereas beforeRouteLeave on the route path is an active interception.
| Context | Leaving with unsaved changes |
|---|---|
| Route page | Confirmation dialog is shown |
| Drawer | Pill indicator is shown, but dismissal proceeds |
If matching behavior is desired, the drawer could prompt on close as well — note that this needs to cover the X button, scrim click, and Escape: Escape is handled by v-overlay internally mutating v-model, so it does not go through close(). If the existing passive indicator is considered sufficient, then this can be treated as working as intended.
Deferring to the maintainers.