refactor(notice): make the notice table exhaustive and drop dead wire entries

D5 cleanup, frontend and backend in one commit: removes the six
config_validate::* statuses that never receive a backend send and the
set_config::ok send (enum variants, golden list 41→34, send point in
restart_clash_core), their frontend handlers, and the five i18n keys only
those handlers used. The notice table is now typed as a Record over the
generated NoticeStatus union, so a status without a frontend entry fails
to compile. The info status (sent by the silent updater for breaking
change notices, previously dropped with a console warning) now shows an
info toast — the one deliberate behavior delta.
This commit is contained in:
Tunglies
2026-10-01 04:20:26 +08:00
parent 139cc09304
commit 9e7669ff50
21 changed files with 42 additions and 180 deletions
-5
View File
@@ -900,7 +900,6 @@ export const translationKeys = [
'shared.feedback.notifications.common.refreshFailed',
'shared.feedback.validation.config.failed',
'shared.feedback.validation.config.bootFailed',
'shared.feedback.validation.config.coreChangeFailed',
'shared.feedback.validation.config.processTerminated',
'shared.feedback.validation.script.syntaxError',
'shared.feedback.validation.script.missingMain',
@@ -909,12 +908,8 @@ export const translationKeys = [
'shared.feedback.validation.yaml.syntaxError',
'shared.feedback.validation.yaml.readError',
'shared.feedback.validation.yaml.mappingError',
'shared.feedback.validation.yaml.keyError',
'shared.feedback.validation.yaml.generalError',
'shared.feedback.validation.merge.syntaxError',
'shared.feedback.validation.merge.mappingError',
'shared.feedback.validation.merge.keyError',
'shared.feedback.validation.merge.generalError',
'shared.filters.logLevels.all',
'shared.filters.logLevels.debug',
'shared.filters.logLevels.info',
-5
View File
@@ -1464,13 +1464,10 @@ export interface TranslationResources {
validation: {
config: {
bootFailed: string
coreChangeFailed: string
failed: string
processTerminated: string
}
merge: {
generalError: string
keyError: string
mappingError: string
syntaxError: string
}
@@ -1481,8 +1478,6 @@ export interface TranslationResources {
syntaxError: string
}
yaml: {
generalError: string
keyError: string
mappingError: string
readError: string
syntaxError: string