dsh-config-manager 0.8.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/lib/adapters/mcp.js +51 -15
  2. package/lib/adapters/messages.d.ts +1 -0
  3. package/lib/adapters/messages.js +2 -0
  4. package/lib/adapters/patch-key-guard.d.ts +23 -0
  5. package/lib/adapters/patch-key-guard.js +13 -0
  6. package/lib/adapters/plugin-data.d.ts +19 -5
  7. package/lib/adapters/plugin-data.js +76 -22
  8. package/lib/adapters/plugins.d.ts +14 -1
  9. package/lib/adapters/plugins.js +204 -6
  10. package/lib/adapters/prompts.js +15 -4
  11. package/lib/adapters/test-helpers.d.ts +15 -1
  12. package/lib/adapters/test-helpers.js +11 -0
  13. package/lib/cli/actions.d.ts +7 -105
  14. package/lib/cli/actions.js +16 -172
  15. package/lib/cli/control-state.d.ts +54 -0
  16. package/lib/cli/control-state.js +107 -0
  17. package/lib/cli/help.d.ts +1 -1
  18. package/lib/cli/help.js +21 -14
  19. package/lib/cli/index.js +132 -104
  20. package/lib/cli/sessions-repair.js +58 -22
  21. package/lib/cli/web/client-script.d.ts +1 -1
  22. package/lib/cli/web/client-script.js +71 -5
  23. package/lib/cli/web/page.d.ts +9 -19
  24. package/lib/cli/web/page.js +277 -173
  25. package/lib/cli/web/routes.js +85 -25
  26. package/lib/cli/write-gates.d.ts +61 -0
  27. package/lib/cli/write-gates.js +110 -0
  28. package/lib/client.d.ts +196 -75
  29. package/lib/client.js +8139 -7487
  30. package/lib/core/backup.d.ts +0 -4
  31. package/lib/core/backup.js +21 -4
  32. package/lib/core/boot-rescue.d.ts +1 -1
  33. package/lib/core/boot-rescue.js +12 -1
  34. package/lib/core/boot-safety.js +37 -2
  35. package/lib/core/conflict-decisions.js +2 -1
  36. package/lib/core/exporter.js +22 -1
  37. package/lib/core/journal.d.ts +54 -4
  38. package/lib/core/journal.js +158 -35
  39. package/lib/core/local-plugin-host.d.ts +29 -0
  40. package/lib/core/local-plugin-host.js +55 -48
  41. package/lib/core/messages.d.ts +17 -0
  42. package/lib/core/messages.js +34 -0
  43. package/lib/core/migration-history.js +16 -9
  44. package/lib/core/model-tools.d.ts +2 -2
  45. package/lib/core/model-tools.js +20 -2
  46. package/lib/core/patch-chain.d.ts +65 -0
  47. package/lib/core/patch-chain.js +100 -0
  48. package/lib/core/patch-document.d.ts +32 -4
  49. package/lib/core/patch-document.js +48 -17
  50. package/lib/core/patch-secret-guard.d.ts +49 -0
  51. package/lib/core/patch-secret-guard.js +164 -0
  52. package/lib/core/reconcile.d.ts +8 -0
  53. package/lib/core/reconcile.js +18 -3
  54. package/lib/core/reinstall.d.ts +2 -0
  55. package/lib/core/reinstall.js +6 -2
  56. package/lib/core/restore.js +31 -6
  57. package/lib/core/section-sanitize.d.ts +32 -0
  58. package/lib/core/section-sanitize.js +13 -0
  59. package/lib/core/snapshot-diff.d.ts +30 -0
  60. package/lib/core/snapshot-diff.js +56 -20
  61. package/lib/core/startup-barrier.js +8 -2
  62. package/lib/core/types.d.ts +38 -1
  63. package/lib/core/update-check.js +51 -2
  64. package/lib/foreign/kernel.js +9 -2
  65. package/lib/foreign/read-claude-plugins.js +29 -11
  66. package/lib/foreign/read-dsh.js +31 -2
  67. package/lib/foreign/session-ir.js +50 -9
  68. package/lib/foreign/session-read.d.ts +8 -0
  69. package/lib/foreign/session-read.js +26 -0
  70. package/lib/index.d.ts +9 -4
  71. package/lib/index.js +42 -47
  72. package/lib/profiles/dsh-profile-io.d.ts +20 -0
  73. package/lib/profiles/dsh-profile-io.js +27 -0
  74. package/lib/profiles/dsh-profile-manager.d.ts +27 -0
  75. package/lib/profiles/dsh-profile-manager.js +45 -4
  76. package/lib/profiles/dsh-profile-runtime.d.ts +5 -1
  77. package/lib/profiles/dsh-profile-runtime.js +16 -3
  78. package/lib/profiles/process-control.d.ts +18 -1
  79. package/lib/profiles/process-control.js +25 -1
  80. package/lib/routes/profiles.js +2 -1
  81. package/lib/routes/sync.js +19 -1
  82. package/lib/schema/types.d.ts +11 -0
  83. package/lib/security/redaction.js +22 -6
  84. package/lib/sync/autosync-repeat.d.ts +27 -0
  85. package/lib/sync/autosync-repeat.js +23 -0
  86. package/lib/sync/autosync-scheduler.d.ts +47 -2
  87. package/lib/sync/autosync-scheduler.js +217 -53
  88. package/lib/sync/baseline-heal.js +7 -0
  89. package/lib/sync/baseline-record.d.ts +67 -0
  90. package/lib/sync/baseline-record.js +74 -0
  91. package/lib/sync/blob-store.js +13 -0
  92. package/lib/sync/content-diff.d.ts +39 -0
  93. package/lib/sync/content-diff.js +46 -0
  94. package/lib/sync/git/git-transport.d.ts +32 -1
  95. package/lib/sync/git/git-transport.js +146 -26
  96. package/lib/sync/github-auth.d.ts +17 -1
  97. package/lib/sync/github-auth.js +37 -1
  98. package/lib/sync/local-changes.d.ts +15 -0
  99. package/lib/sync/local-changes.js +39 -0
  100. package/lib/sync/merge-apply-plan.d.ts +38 -0
  101. package/lib/sync/merge-apply-plan.js +76 -0
  102. package/lib/sync/merge-keyed.d.ts +68 -0
  103. package/lib/sync/merge-keyed.js +124 -0
  104. package/lib/sync/messages.d.ts +1 -0
  105. package/lib/sync/messages.js +2 -0
  106. package/lib/sync/patch-line-identity.d.ts +19 -0
  107. package/lib/sync/patch-line-identity.js +99 -0
  108. package/lib/sync/pending-merge.d.ts +41 -0
  109. package/lib/sync/pending-merge.js +61 -0
  110. package/lib/sync/plugin-removals.d.ts +15 -15
  111. package/lib/sync/plugin-removals.js +134 -83
  112. package/lib/sync/push-skip.d.ts +55 -0
  113. package/lib/sync/push-skip.js +70 -0
  114. package/lib/sync/s3/s3-transport.d.ts +14 -2
  115. package/lib/sync/s3/s3-transport.js +72 -48
  116. package/lib/sync/sync-engine.d.ts +44 -51
  117. package/lib/sync/sync-engine.js +160 -194
  118. package/lib/sync/sync-history.d.ts +7 -0
  119. package/lib/sync/sync-state.d.ts +28 -0
  120. package/lib/sync/sync-state.js +20 -0
  121. package/lib/sync/transport.d.ts +12 -3
  122. package/lib/sync/transport.js +13 -4
  123. package/lib/sync/webdav/webdav-transport.d.ts +19 -2
  124. package/lib/sync/webdav/webdav-transport.js +81 -40
  125. package/lib/sync/workspace-merge.d.ts +8 -2
  126. package/lib/ui/artifact-view.d.ts +1 -1
  127. package/lib/ui/commands.js +5 -11
  128. package/lib/ui/dsh-profiles-view.d.ts +8 -3
  129. package/lib/ui/dsh-profiles-view.js +9 -5
  130. package/lib/ui/foreign-view.d.ts +14 -0
  131. package/lib/ui/foreign-view.js +34 -0
  132. package/lib/ui/i18n.d.ts +7 -1
  133. package/lib/ui/i18n.js +15 -2
  134. package/lib/ui/menu-placement.js +1 -1
  135. package/lib/ui/migration-consult-view.d.ts +11 -0
  136. package/lib/ui/migration-consult-view.js +15 -0
  137. package/lib/ui/overview-view.d.ts +7 -0
  138. package/lib/ui/overview-view.js +3 -0
  139. package/lib/ui/report.d.ts +9 -0
  140. package/lib/ui/report.js +17 -4
  141. package/lib/ui/selection-model.d.ts +10 -2
  142. package/lib/ui/selection-model.js +23 -3
  143. package/lib/utils/async-once.d.ts +11 -0
  144. package/lib/utils/async-once.js +15 -0
  145. package/lib/utils/patch-chain-read.d.ts +51 -0
  146. package/lib/utils/patch-chain-read.js +240 -0
  147. package/lib/utils/patch-yaml.d.ts +39 -1
  148. package/lib/utils/patch-yaml.js +82 -2
  149. package/lib/utils/paths.d.ts +13 -0
  150. package/lib/utils/paths.js +35 -0
  151. package/lib/utils/workdir-lock.js +18 -3
  152. package/package.json +3 -2
  153. package/src/adapters/mcp.test.ts +29 -0
  154. package/src/adapters/mcp.ts +52 -14
  155. package/src/adapters/messages.ts +2 -0
  156. package/src/adapters/patch-key-guard.ts +29 -0
  157. package/src/adapters/plugin-data.test.ts +126 -0
  158. package/src/adapters/plugin-data.ts +97 -26
  159. package/src/adapters/plugins.test.ts +403 -0
  160. package/src/adapters/plugins.ts +198 -8
  161. package/src/adapters/prompts.ts +15 -4
  162. package/src/adapters/test-helpers.ts +15 -1
  163. package/src/cli/actions.test.ts +74 -1
  164. package/src/cli/actions.ts +27 -246
  165. package/src/cli/control-state.ts +143 -0
  166. package/src/cli/help.ts +21 -14
  167. package/src/cli/index.ts +123 -107
  168. package/src/cli/sessions-repair.ts +55 -22
  169. package/src/cli/web/client-script.ts +71 -5
  170. package/src/cli/web/page.ts +327 -208
  171. package/src/cli/web/routes.ts +85 -25
  172. package/src/cli/web/web.test.ts +65 -0
  173. package/src/cli/write-gates.ts +149 -0
  174. package/src/client/ConfigManagerSection.tsx +8 -4
  175. package/src/client/about/AboutPanel.tsx +9 -12
  176. package/src/client/about/release-notes-view.test.ts +17 -0
  177. package/src/client/about/release-notes-view.ts +49 -24
  178. package/src/client/api.ts +2 -1
  179. package/src/client/chat/ChatEntryView.tsx +2 -2
  180. package/src/client/chat/rollback-entry-view.ts +6 -1
  181. package/src/client/common/CommandPalette.tsx +6 -3
  182. package/src/client/common/ConfirmDialog.tsx +29 -12
  183. package/src/client/common/ContentPicker.tsx +24 -24
  184. package/src/client/common/Modal.tsx +12 -5
  185. package/src/client/common/MoreMenu.tsx +4 -1
  186. package/src/client/common/RunsCenter.tsx +103 -32
  187. package/src/client/common/Select.tsx +2 -2
  188. package/src/client/common/floating-bounds.ts +1 -1
  189. package/src/client/common/floating-units.test.ts +1 -2
  190. package/src/client/common/plan-text-redaction.test.ts +190 -5
  191. package/src/client/common/runs-center-guard.test.ts +60 -0
  192. package/src/client/common/runs-center-view.test.ts +128 -0
  193. package/src/client/common/runs-center-view.ts +96 -0
  194. package/src/client/common/section-title-action.test.ts +66 -0
  195. package/src/client/common/ui.tsx +93 -30
  196. package/src/client/config-manager.module.css +1515 -270
  197. package/src/client/consult/ConsultCard.tsx +7 -6
  198. package/src/client/environment/EnvironmentPanel.tsx +22 -25
  199. package/src/client/environment/maintenance/DiskUsageCard.tsx +69 -96
  200. package/src/client/environment/profiles-incomplete-ui.test.ts +8 -8
  201. package/src/client/export/ExportView.tsx +7 -16
  202. package/src/client/history/HistoryPanel.tsx +88 -28
  203. package/src/client/history/history-locales.ts +3 -3
  204. package/src/client/home/BackupScheduleCard.tsx +77 -69
  205. package/src/client/home/HomePanel.tsx +47 -12
  206. package/src/client/import/ConflictList.tsx +13 -13
  207. package/src/client/import/ForeignImportView.tsx +67 -9
  208. package/src/client/import/ImportWizardView.tsx +4 -4
  209. package/src/client/import/PathMappingForm.tsx +36 -9
  210. package/src/client/import/PathPickerDialog.tsx +2 -1
  211. package/src/client/import/import-wizard-split.test.ts +1 -1
  212. package/src/client/import/import-wizard-steps.tsx +51 -39
  213. package/src/client/import/use-import-wizard-controller.test.ts +129 -0
  214. package/src/client/import/use-import-wizard-controller.ts +116 -22
  215. package/src/client/library/ArtifactRow.tsx +2 -2
  216. package/src/client/library/BackupInspectView.tsx +21 -15
  217. package/src/client/library/LibraryActions.tsx +116 -28
  218. package/src/client/library/LibraryPanel.tsx +14 -15
  219. package/src/client/library/RestorePlanView.tsx +13 -8
  220. package/src/client/locales/about.ts +0 -2
  221. package/src/client/locales/backup.ts +15 -12
  222. package/src/client/locales/common.ts +2 -0
  223. package/src/client/locales/export.ts +5 -12
  224. package/src/client/locales/foreign.ts +4 -2
  225. package/src/client/locales/import.ts +5 -2
  226. package/src/client/locales/overview.ts +4 -0
  227. package/src/client/locales/profiles.ts +32 -4
  228. package/src/client/locales/restore.ts +2 -2
  229. package/src/client/locales/sessions.ts +0 -2
  230. package/src/client/locales/shell.ts +2 -2
  231. package/src/client/market/MarketImportReview.tsx +4 -4
  232. package/src/client/market/MarketPanel.tsx +58 -56
  233. package/src/client/market/MyConfigsList.tsx +34 -32
  234. package/src/client/market/MyConfigsLoginCard.tsx +12 -15
  235. package/src/client/market/MyConfigsView.tsx +8 -15
  236. package/src/client/market/MyConfigsWizard.tsx +7 -12
  237. package/src/client/market/market-locales.ts +0 -6
  238. package/src/client/market/my-configs-split.test.ts +2 -1
  239. package/src/client/nav-menu-clip-guard.test.ts +52 -0
  240. package/src/client/recovery/IncompleteCopiesSection.tsx +1 -3
  241. package/src/client/recovery/RecoveryPanel.tsx +35 -22
  242. package/src/client/recovery/RollbackCard.tsx +132 -75
  243. package/src/client/recovery/RollbackFileChanges.tsx +40 -27
  244. package/src/client/recovery/SessionHealthCard.tsx +2 -2
  245. package/src/client/recovery/SessionHealthDialog.tsx +5 -7
  246. package/src/client/recovery/SessionLayoutSection.tsx +3 -5
  247. package/src/client/recovery/recovery-locales.ts +12 -8
  248. package/src/client/recovery/rollback-enabled.ts +29 -0
  249. package/src/client/recovery/use-recovery-write.ts +5 -0
  250. package/src/client/run-store.test.ts +30 -0
  251. package/src/client/run-store.ts +21 -1
  252. package/src/client/sync/AddChannelCard.tsx +65 -0
  253. package/src/client/sync/AutosyncCard.tsx +184 -108
  254. package/src/client/sync/ChannelClearConfirmDialog.tsx +5 -1
  255. package/src/client/sync/ChannelConfigDialog.tsx +27 -48
  256. package/src/client/sync/MergePreviewView.tsx +5 -7
  257. package/src/client/sync/PushPreviewCard.tsx +2 -1
  258. package/src/client/sync/PushReportSections.tsx +35 -0
  259. package/src/client/sync/SyncChannelEntryCard.tsx +33 -24
  260. package/src/client/sync/SyncConfirmView.tsx +130 -133
  261. package/src/client/sync/SyncLogList.tsx +29 -14
  262. package/src/client/sync/SyncPanel.tsx +188 -185
  263. package/src/client/sync/SyncProbeRow.tsx +5 -7
  264. package/src/client/sync/SyncRepositoryPicker.tsx +17 -4
  265. package/src/client/sync/SyncSecuritySection.tsx +157 -0
  266. package/src/client/sync/SyncSettingsDialog.tsx +293 -0
  267. package/src/client/sync/SyncSettingsView.test.ts +26 -8
  268. package/src/client/sync/WorkDirCard.tsx +2 -4
  269. package/src/client/sync/config-clear-guard.test.ts +94 -0
  270. package/src/client/sync/config-clear-guard.ts +98 -0
  271. package/src/client/sync/config-dirty.test.ts +91 -0
  272. package/src/client/sync/config-dirty.ts +88 -0
  273. package/src/client/sync/history-model.test.ts +2 -0
  274. package/src/client/sync/history-model.ts +5 -0
  275. package/src/client/sync/merge-request.ts +20 -0
  276. package/src/client/sync/sync-api.ts +13 -1
  277. package/src/client/sync/sync-locales.ts +95 -47
  278. package/src/client/sync/sync-panel-clear.test.ts +44 -0
  279. package/src/client/sync/sync-push-preview.test.ts +9 -0
  280. package/src/client/sync/sync-view.test.ts +20 -0
  281. package/src/client/sync/sync-view.ts +76 -4
  282. package/src/core/backup.test.ts +61 -1
  283. package/src/core/backup.ts +21 -4
  284. package/src/core/boot-rescue.test.ts +35 -0
  285. package/src/core/boot-rescue.ts +13 -2
  286. package/src/core/boot-safety.test.ts +25 -0
  287. package/src/core/boot-safety.ts +37 -2
  288. package/src/core/conflict-decisions.ts +2 -1
  289. package/src/core/exporter.ts +21 -1
  290. package/src/core/journal.test.ts +183 -0
  291. package/src/core/journal.ts +163 -25
  292. package/src/core/local-plugin-host.test.ts +68 -2
  293. package/src/core/local-plugin-host.ts +31 -4
  294. package/src/core/messages.ts +34 -0
  295. package/src/core/migration-history.test.ts +27 -0
  296. package/src/core/migration-history.ts +12 -4
  297. package/src/core/model-tools.test.ts +67 -0
  298. package/src/core/model-tools.ts +22 -4
  299. package/src/core/patch-chain.test.ts +83 -0
  300. package/src/core/patch-chain.ts +150 -0
  301. package/src/core/patch-document.test.ts +48 -1
  302. package/src/core/patch-document.ts +66 -15
  303. package/src/core/patch-layers.test.ts +1 -1
  304. package/src/core/patch-secret-guard.test.ts +110 -0
  305. package/src/core/patch-secret-guard.ts +176 -0
  306. package/src/core/reconcile.ts +32 -4
  307. package/src/core/reinstall.ts +8 -2
  308. package/src/core/restore.ts +32 -7
  309. package/src/core/section-sanitize.ts +37 -0
  310. package/src/core/smoke.test.ts +2 -1
  311. package/src/core/snapshot-diff.test.ts +73 -1
  312. package/src/core/snapshot-diff.ts +66 -21
  313. package/src/core/startup-barrier.test.ts +64 -0
  314. package/src/core/startup-barrier.ts +8 -2
  315. package/src/core/types.ts +43 -2
  316. package/src/core/update-check.test.ts +40 -0
  317. package/src/core/update-check.ts +53 -2
  318. package/src/foreign/claude-code.test.ts +5 -0
  319. package/src/foreign/claude-plugins.test.ts +57 -0
  320. package/src/foreign/claude-sessions-bytes.test.ts +7 -1
  321. package/src/foreign/dsh.test.ts +23 -0
  322. package/src/foreign/kernel.ts +9 -2
  323. package/src/foreign/read-claude-plugins.ts +32 -11
  324. package/src/foreign/read-dsh.ts +33 -2
  325. package/src/foreign/session-ir.test.ts +67 -0
  326. package/src/foreign/session-ir.ts +54 -14
  327. package/src/foreign/session-read.ts +23 -0
  328. package/src/index.facade.test.ts +186 -6
  329. package/src/index.ts +53 -47
  330. package/src/profiles/dsh-profile-copy-rollback.test.ts +58 -4
  331. package/src/profiles/dsh-profile-io.ts +29 -0
  332. package/src/profiles/dsh-profile-manager.test.ts +30 -0
  333. package/src/profiles/dsh-profile-manager.ts +53 -5
  334. package/src/profiles/dsh-profile-runtime.test.ts +29 -7
  335. package/src/profiles/dsh-profile-runtime.ts +17 -3
  336. package/src/profiles/process-control.test.ts +97 -0
  337. package/src/profiles/process-control.ts +28 -1
  338. package/src/routes/profiles.ts +2 -1
  339. package/src/routes/sync.ts +19 -1
  340. package/src/schema/types.ts +16 -1
  341. package/src/security/redaction.test.ts +31 -0
  342. package/src/security/redaction.ts +23 -6
  343. package/src/security/security.test.ts +1 -1
  344. package/src/sync/autosync-repeat.test.ts +58 -0
  345. package/src/sync/autosync-repeat.ts +55 -0
  346. package/src/sync/autosync-scheduler.test.ts +515 -0
  347. package/src/sync/autosync-scheduler.ts +225 -51
  348. package/src/sync/baseline-heal.ts +6 -0
  349. package/src/sync/baseline-record.ts +135 -0
  350. package/src/sync/blob-store.test.ts +16 -0
  351. package/src/sync/blob-store.ts +13 -0
  352. package/src/sync/content-diff.test.ts +95 -0
  353. package/src/sync/content-diff.ts +79 -0
  354. package/src/sync/git/git-transport.test.ts +151 -4
  355. package/src/sync/git/git-transport.ts +143 -27
  356. package/src/sync/github-auth.test.ts +26 -1
  357. package/src/sync/github-auth.ts +37 -1
  358. package/src/sync/local-changes.ts +40 -0
  359. package/src/sync/merge-apply-plan.ts +117 -0
  360. package/src/sync/merge-keyed.test.ts +167 -0
  361. package/src/sync/merge-keyed.ts +160 -0
  362. package/src/sync/messages.ts +3 -0
  363. package/src/sync/patch-line-identity.test.ts +73 -0
  364. package/src/sync/patch-line-identity.ts +105 -0
  365. package/src/sync/pending-merge.test.ts +41 -0
  366. package/src/sync/pending-merge.ts +85 -0
  367. package/src/sync/plugin-removals.test.ts +199 -39
  368. package/src/sync/plugin-removals.ts +150 -64
  369. package/src/sync/push-skip.test.ts +326 -0
  370. package/src/sync/push-skip.ts +102 -0
  371. package/src/sync/s3/s3-delete-and-blob-index.test.ts +249 -0
  372. package/src/sync/s3/s3-transport.ts +76 -42
  373. package/src/sync/sync-config.test.ts +39 -12
  374. package/src/sync/sync-device-identity.test.ts +3 -0
  375. package/src/sync/sync-engine.test.ts +465 -12
  376. package/src/sync/sync-engine.ts +189 -193
  377. package/src/sync/sync-history.ts +7 -0
  378. package/src/sync/sync-state.ts +48 -0
  379. package/src/sync/transport.test.ts +13 -1
  380. package/src/sync/transport.ts +12 -4
  381. package/src/sync/webdav/webdav-delete-and-blob-index.test.ts +249 -0
  382. package/src/sync/webdav/webdav-transport.ts +86 -34
  383. package/src/sync/workspace-merge.ts +9 -2
  384. package/src/ui/artifact-view.ts +1 -1
  385. package/src/ui/commands.test.ts +11 -0
  386. package/src/ui/commands.ts +5 -14
  387. package/src/ui/dsh-profiles-view.test.ts +16 -0
  388. package/src/ui/dsh-profiles-view.ts +11 -5
  389. package/src/ui/foreign-view.test.ts +49 -0
  390. package/src/ui/foreign-view.ts +47 -0
  391. package/src/ui/i18n.ts +15 -2
  392. package/src/ui/menu-placement.ts +1 -1
  393. package/src/ui/migration-consult-view.test.ts +20 -1
  394. package/src/ui/migration-consult-view.ts +17 -0
  395. package/src/ui/overview-view.ts +10 -0
  396. package/src/ui/report.test.ts +25 -1
  397. package/src/ui/report.ts +15 -4
  398. package/src/ui/selection-model.test.ts +29 -1
  399. package/src/ui/selection-model.ts +25 -4
  400. package/src/utils/async-once.ts +14 -0
  401. package/src/utils/js-yaml4.d.ts +35 -0
  402. package/src/utils/patch-chain-read.test.ts +171 -0
  403. package/src/utils/patch-chain-read.ts +259 -0
  404. package/src/utils/patch-yaml.test.ts +215 -3
  405. package/src/utils/patch-yaml.ts +98 -2
  406. package/src/utils/paths.test.ts +14 -1
  407. package/src/utils/paths.ts +35 -0
  408. package/src/utils/workdir-lock.test.ts +69 -0
  409. package/src/utils/workdir-lock.ts +17 -3
  410. package/lib/ui/path-mapping.d.ts +0 -38
  411. package/lib/ui/path-mapping.js +0 -75
  412. package/src/client/common/InfoHint.tsx +0 -289
  413. package/src/client/common/info-hint-guard.test.ts +0 -1119
  414. package/src/client/sync/DecryptPasswordCard.tsx +0 -48
  415. package/src/client/sync/SecurityOptionsCard.tsx +0 -97
  416. package/src/client/sync/SyncSectionPickerDialog.tsx +0 -213
  417. package/src/ui/path-mapping.test.ts +0 -67
  418. package/src/ui/path-mapping.ts +0 -103
@@ -25,8 +25,9 @@ import type { TranslateNS } from '../client-types.ts'
25
25
  import type { ConfigManagerApi } from '../api.ts'
26
26
  import type { ImportResult, ItemResolution } from '../../core/types.ts'
27
27
  import type { SectionId } from '../../schema/types.ts'
28
- import { Badge, Banner, Button, Card, Empty, SectionTitle } from '../common/ui.tsx'
29
- import { InfoHint } from '../common/InfoHint.tsx'
28
+ import { Badge, Banner, Button, Card, Checkbox, Empty, SectionTitle, Segmented } from '../common/ui.tsx'
29
+ import { ErrorBanner } from '../common/ErrorBanner.tsx'
30
+ import { InspectIcon } from '../common/Icon.tsx'
30
31
  import { Skeleton, SkeletonList } from '../common/Skeleton.tsx'
31
32
  import { Select } from '../common/Select.tsx'
32
33
  import { effectiveImportSelection, type Selection } from '../../ui/selection-model.ts'
@@ -51,6 +52,7 @@ import type { MyInstallSlice, MyWizardSlice } from './my-configs-view.ts'
51
52
  import { readDisclaimerDismissed, writeDisclaimerDismissed } from './disclaimer.ts'
52
53
  import type { DisclaimerKey } from './disclaimer.ts'
53
54
  import { ConfirmDialog } from '../common/ConfirmDialog.tsx'
55
+ import { sectionLabel } from '../common/section-labels.ts'
54
56
  import { redact } from '../../security/redaction.ts'
55
57
  import { runStore, toMarketStoreSlice, type MarketStoreSlice } from '../run-store.ts'
56
58
  import css from '../config-manager.module.css'
@@ -424,28 +426,25 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
424
426
  }
425
427
 
426
428
  return (
427
- <div className={css.viewBody}>
429
+ /* 浏览列表模式整屏定高(.marketFill):筛选卡吃满剩余高度、条目在卡内滚动,
430
+ 整页不跟着条目数变长(视觉稿 T-04:筛选卡 flex-1)。详情页不套定高,保持整页滚动。 */
431
+ <div
432
+ className={
433
+ state.subView === 'browse' && !downloadOpen
434
+ ? `${css.viewBody} ${css.marketView} ${css.marketFill}`
435
+ : `${css.viewBody} ${css.marketView}`
436
+ }
437
+ >
428
438
  {/* 子视图切换(§4.6):浏览市场 / 我的配置(低频面板状态镜像 runStore,切 tab/刷新不丢) */}
429
- <div className={css.modeTabs} role="tablist">
430
- <button
431
- type="button" role="tab"
432
- aria-selected={state.subView === 'browse'}
433
- data-active={state.subView === 'browse' ? '' : undefined}
434
- className={css.modeTab}
435
- onClick={() => { patch({ subView: 'browse' }) }}
436
- >
437
- {t('myconfigs.tab.browse')}
438
- </button>
439
- <button
440
- type="button" role="tab"
441
- aria-selected={state.subView === 'myconfigs'}
442
- data-active={state.subView === 'myconfigs' ? '' : undefined}
443
- className={css.modeTab}
444
- onClick={() => { patch({ subView: 'myconfigs' }) }}
445
- >
446
- {t('myconfigs.tab.myconfigs')}
447
- </button>
448
- </div>
439
+ <Segmented
440
+ items={[
441
+ { id: 'browse', label: t('myconfigs.tab.browse') },
442
+ { id: 'myconfigs', label: t('myconfigs.tab.myconfigs') },
443
+ ]}
444
+ active={state.subView}
445
+ onChange={(id) => { patch({ subView: id as 'browse' | 'myconfigs' }) }}
446
+ ariaLabel={t('section.label')}
447
+ />
449
448
 
450
449
  {/* 「我的配置」子视图(登录卡 / 上传向导 / 已上传列表 / 装回本地) */}
451
450
  {state.subView === 'myconfigs' ? (
@@ -471,7 +470,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
471
470
  {/* 列表视图的表头与市场操作卡:进入条目向导页时整块让位(P2 起向导是**页面**,
472
471
  不再在列表之上叠弹窗) */}
473
472
  {!downloadOpen && (<>
474
- <SectionTitle title={t('section.label')} info={<InfoHint text={t('section.description')} label={t('common.infoHint')} />} />
473
+ <SectionTitle title={t('section.label')} tooltip={t('section.description')} />
475
474
 
476
475
  {/* 市场操作行(2026-11-01):原为一张卡,卡里只有标题 + 两个按钮,右侧四百多像素永远空着
477
476
  (app-screens §4.2 卡内死空间,白吃约 50px)。改成标题与动作同一行 —— 它本来就是
@@ -595,19 +594,25 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
595
594
  </>
596
595
  )}
597
596
 
598
- {/* 条目列表(浏览) */}
597
+ {/* 条目列表(浏览):整卡吃满剩余高度(.marketListCard),条目在卡内滚动 */}
599
598
  {!downloadOpen && (
600
- <Card>
599
+ <Card
600
+ className={
601
+ !state.browsing && state.loadError === null && filtered.length > 0
602
+ ? `${css.marketListCard} ${css.marketListCardFill}`
603
+ : css.marketListCard
604
+ }
605
+ >
601
606
  {/* 加载失败必须说清原因并可就地重试:此前把 loadError 渲染成中性空态文案
602
607
  (「内置市场尚未加载,请先『拉取最新』」),错误原文被整个丢弃 ——
603
608
  用户只会反复点刷新,永远不知是宿主没就绪、网络不通还是本地 index 读不出来。 */}
604
609
  {state.loadError !== null && (
605
- <>
606
- <Banner kind="error">{redact(state.loadError)}</Banner>
607
- <div className={css.actionRow}>
608
- <Button loading={state.loading} onClick={() => { void loadStatus() }}>{t('common.retry')}</Button>
609
- </div>
610
- </>
610
+ <ErrorBanner
611
+ error={redact(state.loadError)}
612
+ onRetry={() => { void loadStatus() }}
613
+ retrying={state.loading}
614
+ t={api.t}
615
+ />
611
616
  )}
612
617
  {state.loadError === null && (<>
613
618
  {/* 筛选控件 2×2 网格(搜索框跨两列 + 4 个 select 两两一行):
@@ -615,13 +620,17 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
615
620
  窄画布(宿主设置弹窗 564px)下 2 列优于 4 列。 */}
616
621
  <div className={css.marketFilterGrid}>
617
622
  {/* 搜索 + 类别过滤 + 来源筛选 + 排序(2026-08-21 新增;状态镜像 runStore) */}
618
- <input
619
- type="text"
620
- className={`${css.input} ${css.marketFilterSearch}`}
621
- value={state.search}
622
- placeholder={t('list.searchPlaceholder')}
623
- onChange={(e: ChangeEvent<HTMLInputElement>) => { patch({ search: e.target.value }) }}
624
- />
623
+ {/* 搜索框:12px 放大镜内嵌 + 无描边 input(描边归外壳,聚焦时整框变色) */}
624
+ <div className={`${css.marketSearchBox} ${css.marketFilterSearch}`}>
625
+ <InspectIcon size={12} />
626
+ <input
627
+ type="text"
628
+ className={css.marketSearchInput}
629
+ value={state.search}
630
+ placeholder={t('list.searchPlaceholder')}
631
+ onChange={(e: ChangeEvent<HTMLInputElement>) => { patch({ search: e.target.value }) }}
632
+ />
633
+ </div>
625
634
  <Select
626
635
  value={state.category}
627
636
  ariaLabel={t('list.categoriesAll')}
@@ -638,7 +647,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
638
647
  onChange={(next) => { patch({ sectionFilter: next }) }}
639
648
  options={[
640
649
  { value: '', label: t('list.sectionsAll') },
641
- ...sectionOptions.map((s) => ({ value: s, label: s })),
650
+ ...sectionOptions.map((s) => ({ value: s, label: sectionLabel(s as SectionId, cmT) })),
642
651
  ]}
643
652
  />
644
653
  <Select
@@ -679,27 +688,27 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
679
688
  </>)}
680
689
  {state.browsing && <SkeletonList label={t('list.loading')} />}
681
690
  {!state.browsing && state.loadError === null && state.items.length === 0 && <Empty>{t('list.noItems')}</Empty>}
682
- {/* 条目卡片列表 */}
691
+ {/* 条目列表(视觉稿 T-04):分隔线行 + 卡内滚动;名称/版本一行、作者·描述一行、徽章一行 */}
683
692
  {!state.browsing && state.loadError === null && filtered.length > 0 && (
684
- <div className={css.snapshotList}>
693
+ <div className={css.marketItemList}>
685
694
  {filtered.map((it) => {
686
695
  // 来源徽章(阶段 1:条目级来源仓库):官方 ok / 第三方 warn,文案走字典
687
696
  const sourceKind = sourceBadgeKind(it, marketUrl)
688
697
  return (
689
- <div key={it.id} className={css.statRow} style={{ paddingTop: 4 }}>
690
- <div style={{ flex: 1, minWidth: 0 }}>
691
- <div className={css.conflictHead}>
698
+ <div key={it.id} className={css.marketItem}>
699
+ <div className={css.marketItemMain}>
700
+ <div className={`${css.conflictHead} ${css.marketItemHead}`}>
692
701
  <span className={css.conflictId}>{it.name}</span>
693
702
  {it.version !== undefined && <Badge kind="info">{it.version}</Badge>}
694
703
  </div>
695
704
  {(it.author !== undefined || it.description !== undefined) && (
696
- <span className={css.hint}>
705
+ <span className={css.marketItemDesc}>
697
706
  {it.author !== undefined ? `${it.author}` : ''}
698
707
  {it.author !== undefined && it.description !== undefined ? ' · ' : ''}
699
708
  {it.description ?? ''}
700
709
  </span>
701
710
  )}
702
- <div className={css.statRow}>
711
+ <div className={css.marketItemMeta}>
703
712
  <Badge kind={sourceKind}>
704
713
  {sourceKind === 'ok' ? t('list.sourceOfficial') : t('list.sourcePersonal')}
705
714
  </Badge>
@@ -708,7 +717,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
708
717
  {cacheLabel(it.cacheState)}
709
718
  </Badge>
710
719
  {it.stars !== undefined && (
711
- <Badge kind="info" title={t('list.starsHint')}>{t('list.stars', { count: String(it.stars) })}</Badge>
720
+ <Badge kind="info">{t('list.stars', { count: String(it.stars) })}</Badge>
712
721
  )}
713
722
  </div>
714
723
  </div>
@@ -733,14 +742,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
733
742
  onConfirm={confirmDownloadDisclaimer}
734
743
  onCancel={() => { setDisclaimerKey(null) }}
735
744
  >
736
- <label className={css.checkboxRow}>
737
- <input
738
- type="checkbox"
739
- checked={dontAsk}
740
- onChange={(e: ChangeEvent<HTMLInputElement>) => { setDontAsk(e.target.checked) }}
741
- />
742
- <span>{t('disclaimer.dontAsk')}</span>
743
- </label>
745
+ <Checkbox checked={dontAsk} onChange={setDontAsk} label={t('disclaimer.dontAsk')} />
744
746
  </ConfirmDialog>
745
747
  </>
746
748
  )}
@@ -50,8 +50,9 @@ export function MyConfigsList({
50
50
  onRefresh, onChangeDeleteConfirm, onOpenUpdate, onOpenInstall,
51
51
  }: MyConfigsListProps) {
52
52
  return (
53
- <Card>
54
- <div className={css.headRow}>
53
+ /* 视觉稿 T-05:卡片自带一条列表头(h34、下边框),行贴在卡内(p0 0 12),不再用 Card 的 12px 内边距 */
54
+ <Card className={css.marketMyListCard}>
55
+ <div className={css.marketMyListHead}>
55
56
  <span className={css.groupLabel}>{t('myconfigs.list.title')}</span>
56
57
  {/* 撑开剩余空间:Badge 与刷新按钮成组贴右,刷新按钮为该行最右元素 */}
57
58
  <span className={css.statusSpacer} />
@@ -72,45 +73,46 @@ export function MyConfigsList({
72
73
  {myItemsError !== null && <Banner kind="error">{redact(myItemsError)}</Banner>}
73
74
  {listLoading && myItems === null && <SkeletonList label={t('myconfigs.list.loading')} />}
74
75
  {!listLoading && myItems !== null && myItems.length === 0 && <Empty>{t('myconfigs.list.empty')}</Empty>}
76
+ {/* 视觉稿 T-05:每行「名称+版本 / 动作」一行,徽章行在下方;行间 1px 分隔,列表限高内滚 */}
75
77
  {!listLoading && itemViews.length > 0 && (
76
- <div className={css.snapshotList}>
78
+ <div className={css.marketMyItemList}>
77
79
  {itemViews.map(({ entry, view, badge }) => (
78
- <div key={view.id} className={css.statRow} style={{ paddingTop: 4 }}>
79
- <div style={{ flex: 1, minWidth: 0 }}>
80
- <div className={css.conflictHead}>
80
+ <div key={view.id} className={css.marketMyItem}>
81
+ <div className={css.marketMyItemTop}>
82
+ <div className={css.marketMyItemTitle}>
81
83
  <span className={css.conflictId}>{view.name}</span>
82
84
  {view.version !== '' && <Badge kind="info">{view.version}</Badge>}
83
85
  </div>
84
- <div className={css.statRow}>
85
- <Badge kind={badge.kind}>{badge.text}</Badge>
86
- {view.stars !== undefined && (
87
- <Badge kind="info" title={t('list.starsHint')}>{t('list.stars', { count: String(view.stars) })}</Badge>
86
+ <div className={css.marketMyItemActions}>
87
+ <Button onClick={() => { onOpenUpdate(entry) }}>{t('myconfigs.item.update')}</Button>
88
+ <Button
89
+ disabled={install !== null && install.detail === null}
90
+ onClick={() => { onOpenInstall(entry) }}
91
+ >
92
+ {t('myconfigs.item.install')}
93
+ </Button>
94
+ {entry.repoUrl !== '' && <Button href={entry.repoUrl}>{t('myconfigs.list.openRepo')}</Button>}
95
+ {badge.kind === 'warn' && badge.prUrl !== undefined && badge.prUrl !== '' && (
96
+ <Button href={badge.prUrl}>{t('myconfigs.item.openPr')}</Button>
88
97
  )}
89
- {view.author !== '' && <Badge kind="info">{view.author}</Badge>}
90
- {view.updatedAt !== '' && <Badge kind="info">{view.updatedAt}</Badge>}
91
- {view.categories.map((c) => <Badge key={c} kind="info">{c}</Badge>)}
98
+ {/* 删除:danger 按钮 → 弹窗二次确认(ConfirmDialog;不可恢复,已收录自动提交下架 PR) */}
99
+ <Button
100
+ variant="danger"
101
+ disabled={deletingId !== null}
102
+ onClick={() => { onChangeDeleteConfirm(view.id) }}
103
+ >
104
+ {t('myconfigs.delete.run')}
105
+ </Button>
92
106
  </div>
93
107
  </div>
94
- <div className={css.rowActions}>
95
- <Button onClick={() => { onOpenUpdate(entry) }}>{t('myconfigs.item.update')}</Button>
96
- <Button
97
- disabled={install !== null && install.detail === null}
98
- onClick={() => { onOpenInstall(entry) }}
99
- >
100
- {t('myconfigs.item.install')}
101
- </Button>
102
- {entry.repoUrl !== '' && <Button href={entry.repoUrl}>{t('myconfigs.list.openRepo')}</Button>}
103
- {badge.kind === 'warn' && badge.prUrl !== undefined && badge.prUrl !== '' && (
104
- <Button href={badge.prUrl}>{t('myconfigs.item.openPr')}</Button>
108
+ <div className={css.marketMyItemMeta}>
109
+ <Badge kind={badge.kind}>{badge.text}</Badge>
110
+ {view.stars !== undefined && (
111
+ <Badge kind="info">{t('list.stars', { count: String(view.stars) })}</Badge>
105
112
  )}
106
- {/* 删除:danger 按钮 → 弹窗二次确认(ConfirmDialog;不可恢复,已收录自动提交下架 PR) */}
107
- <Button
108
- variant="danger"
109
- disabled={deletingId !== null}
110
- onClick={() => { onChangeDeleteConfirm(view.id) }}
111
- >
112
- {t('myconfigs.delete.run')}
113
- </Button>
113
+ {view.author !== '' && <Badge kind="info">{view.author}</Badge>}
114
+ {view.updatedAt !== '' && <Badge kind="info">{view.updatedAt}</Badge>}
115
+ {view.categories.map((c) => <Badge key={c} kind="info">{c}</Badge>)}
114
116
  </div>
115
117
  </div>
116
118
  ))}
@@ -11,7 +11,6 @@ import { computeGithubLoginView } from '../sync/sync-view.ts'
11
11
  import type { UiT } from '../../ui/i18n.ts'
12
12
  import type { MyGithubFlowState } from '../../ui/my-configs-view.ts'
13
13
  import { Badge, Banner, Button, Card } from '../common/ui.tsx'
14
- import { InfoHint } from '../common/InfoHint.tsx'
15
14
  import { Skeleton } from '../common/Skeleton.tsx'
16
15
  import type { LoginView } from './my-configs-view.ts'
17
16
  import css from '../config-manager.module.css'
@@ -39,7 +38,7 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
39
38
 
40
39
  /** 设备码 + 授权页链接展示(waiting/polling 时) */
41
40
  const renderDeviceCode = (): ReactNode => (
42
- <div className={css.statRow}>
41
+ <div className={css.marketLoginRow}>
43
42
  <Badge kind="info">{t('myconfigs.login.userCode', { code: githubView.userCode })}</Badge>
44
43
  <a className={css.ghostButton} href={githubView.verificationUri} target="_blank" rel="noreferrer" style={{ textDecoration: 'none' }}>
45
44
  {t('myconfigs.login.openAuth')}
@@ -49,18 +48,16 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
49
48
 
50
49
  if (loginView.kind === 'loading') {
51
50
  return (
52
- <Card>
53
- <div className={css.statRow}>
54
- <Skeleton count={2} label={t('myconfigs.login.checking')} />
55
- </div>
51
+ <Card className={css.marketLoginCard}>
52
+ <Skeleton count={2} label={t('myconfigs.login.checking')} />
56
53
  </Card>
57
54
  )
58
55
  }
59
56
  if (loginView.kind === 'logged-out' || loginView.kind === 'token-invalid') {
60
57
  return (
61
- <Card>
62
- <div className={css.actionRow}>
63
- <Button variant="primary" disabled={!githubView.canStart} onClick={() => { onStart() }}>
58
+ <Card className={css.marketLoginCard}>
59
+ <div className={css.marketLoginRow}>
60
+ <Button variant="primary" disabled={!githubView.canStart} onClick={() => { onStart() }} title={t('myconfigs.login.hint')}>
64
61
  {githubView.startLabel}
65
62
  </Button>
66
63
  {githubView.canCancel && (
@@ -69,10 +66,9 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
69
66
  </Button>
70
67
  )}
71
68
  </div>
72
- <InfoHint text={t('myconfigs.login.hint')} label={t('common.infoHint')} />
73
69
  {loginView.kind === 'token-invalid' && <Banner kind="warn">{t('myconfigs.error.loadStatus')}</Banner>}
74
70
  {githubView.showCode && renderDeviceCode()}
75
- <div className={css.statRow}>
71
+ <div className={css.marketLoginRow}>
76
72
  <Badge kind={githubView.phase === 'error' ? 'error' : 'warn'}>{githubView.statusText}</Badge>
77
73
  </div>
78
74
  {/* R-18:失败详情已由 failGithub() 走全局 Toast;此处保留状态行 Badge(持续状态展示,非回执) */}
@@ -81,14 +77,15 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
81
77
  }
82
78
  // logged-in:@login + 固定目标仓库(只读)+ 配置仓库状态
83
79
  return (
84
- <Card>
85
- <div className={css.actionRow}>
80
+ /* 视觉稿 T-05:三行徽章等距(gap 6、px16 py12),不再借用 actionRow/statRow 的行距 */
81
+ <Card className={css.marketLoginCard}>
82
+ <div className={css.marketLoginRow}>
86
83
  <Badge kind="ok">{t('myconfigs.login.loggedInAs', { login: loginView.login })}</Badge>
87
84
  </div>
88
- <div className={css.statRow}>
85
+ <div className={css.marketLoginRow}>
89
86
  <Badge kind="info">{t('myconfigs.login.targetRepo', { repo: targetRepo })}</Badge>
90
87
  </div>
91
- <div className={css.statRow}>
88
+ <div className={css.marketLoginRow}>
92
89
  {loginView.repoExists
93
90
  ? <Badge kind="ok">{t('myconfigs.login.repoReady', { repo: loginView.repoUrl })}</Badge>
94
91
  : <Badge kind="warn">{t('myconfigs.login.repoMissing')}</Badge>}
@@ -26,7 +26,7 @@
26
26
  * 本文件不 import 任何 node 模块(纯浏览器 bundle)。
27
27
  */
28
28
  import { useEffect, useRef, useState } from 'react'
29
- import type { ChangeEvent, ReactNode } from 'react'
29
+ import type { ReactNode } from 'react'
30
30
  import type { TranslateNS } from '../client-types.ts'
31
31
  import type { ConfigManagerApi } from '../api.ts'
32
32
  import { MARKET_UPSTREAM_OWNER, MARKET_UPSTREAM_REPO } from '../../market/upstream.ts'
@@ -34,7 +34,7 @@ import type { MarketApi } from './market-api.ts'
34
34
  import type { MyConfigsApi, MyItemEntry } from './my-configs-api.ts'
35
35
  import type { ListingStatusResponse } from '../../market/my-repo.ts'
36
36
  import type { SyncApi, GithubPollResponse } from '../sync/sync-api.ts'
37
- import { Button, Card, SectionTitle } from '../common/ui.tsx'
37
+ import { Button, Card, Checkbox, SectionTitle } from '../common/ui.tsx'
38
38
  import { ConfirmDialog } from '../common/ConfirmDialog.tsx'
39
39
  import { toast } from '../common/toast-store.ts'
40
40
  import { redact } from '../../security/redaction.ts'
@@ -763,7 +763,8 @@ export function MyConfigsView({
763
763
  }
764
764
 
765
765
  return (
766
- <div className={css.viewBody}>
766
+ /* .myconfigsView:与页签之间 10px(视觉稿 T-05 的 space-y-10;外层 .marketView 是 8px) */
767
+ <div className={`${css.viewBody} ${css.myconfigsView}`}>
767
768
  {/* 标题只留标题:登录说明紧挨着就在下面的登录卡标题 ⓘ 上,同一屏不再出现两遍 */}
768
769
  <SectionTitle title={t('myconfigs.tab.myconfigs')} />
769
770
  {renderLoginCard()}
@@ -771,13 +772,12 @@ export function MyConfigsView({
771
772
  {loginView.kind === 'logged-in' && (
772
773
  <>
773
774
  {/* 一键上传入口:点按钮 → 免责(首次)→ 弹窗向导 */}
774
- <Card>
775
+ {/* 视觉稿 T-05:单动作卡 —— 卡内只有这枚主按钮(h50、px16 py10,按钮垂直居中) */}
776
+ <Card className={css.marketUploadCard}>
775
777
  {/* 卡片里只有一个动作:按钮本身已写明作用对象(上传配置包),不再重复标题。
776
778
  此处不再放 ⓘ:它的「先在导出页生成 zip / 含密钥的备份会被拒绝」已在点开后的
777
779
  向导头(MyConfigsWizard 的 Modal.Header trailing)逐字出现,入口再放一遍是同一条信息两次。 */}
778
- <div className={css.actionRow}>
779
- <Button variant="primary" onClick={openUpload}>{t('myconfigs.upload.run')}</Button>
780
- </div>
780
+ <Button variant="primary" onClick={openUpload}>{t('myconfigs.upload.run')}</Button>
781
781
  </Card>
782
782
  {renderList()}
783
783
  {/* 弹窗:上传/更新向导(uploadOpen)—— 装回本地已改为页面级向导(见上方提前 return) */}
@@ -794,14 +794,7 @@ export function MyConfigsView({
794
794
  onConfirm={confirmDisclaimer}
795
795
  onCancel={cancelDisclaimer}
796
796
  >
797
- <label className={css.checkboxRow}>
798
- <input
799
- type="checkbox"
800
- checked={dontAsk}
801
- onChange={(e: ChangeEvent<HTMLInputElement>) => { setDontAsk(e.target.checked) }}
802
- />
803
- <span>{t('disclaimer.dontAsk')}</span>
804
- </label>
797
+ <Checkbox checked={dontAsk} onChange={setDontAsk} label={t('disclaimer.dontAsk')} />
805
798
  </ConfirmDialog>
806
799
  {/* 删除确认弹窗(二次确认;不可恢复;确认执行中 busy 防重复提交) */}
807
800
  <ConfirmDialog
@@ -12,7 +12,6 @@ import { redact } from '../../security/redaction.ts'
12
12
  import { myPrLinkSource } from '../../ui/my-configs-view.ts'
13
13
  import { Badge, Banner, Button, Field } from '../common/ui.tsx'
14
14
  import { Modal } from '../common/Modal.tsx'
15
- import { InfoHint } from '../common/InfoHint.tsx'
16
15
  import { myConfigFormValid } from './my-configs-view.ts'
17
16
  import type { AutoFieldBadge, MyConfigForm, MyWizardState } from './my-configs-view.ts'
18
17
  import css from '../config-manager.module.css'
@@ -91,7 +90,7 @@ export function MyConfigsWizard({
91
90
  closeDisabled={wizard.running || wizard.validating}
92
91
  trailing={wizard.mode === 'update'
93
92
  ? <Badge kind="info">{t('myconfigs.update.hint')}</Badge>
94
- : <InfoHint text={t('myconfigs.upload.selectHint')} label={t('common.infoHint')} />}
93
+ : undefined}
95
94
  />
96
95
  <Modal.Body scroll>
97
96
 
@@ -109,7 +108,7 @@ export function MyConfigsWizard({
109
108
  }}
110
109
  />
111
110
  <div className={css.actionRow}>
112
- <Button variant="primary" disabled={wizard.running} onClick={() => { fileInput.current?.click() }}>
111
+ <Button variant="primary" disabled={wizard.running} onClick={() => { fileInput.current?.click() }} title={t('myconfigs.upload.selectHint')}>
113
112
  {t('myconfigs.upload.select')}
114
113
  </Button>
115
114
  </div>
@@ -139,7 +138,6 @@ export function MyConfigsWizard({
139
138
  {wizard.step === 'form' && (<>
140
139
  {/* update 模式:表单页内嵌「选择新 ZIP」入口(选中自动校验,通过后才可一键更新) */}
141
140
  {wizard.mode === 'update' && (<>
142
- <InfoHint text={t('myconfigs.update.zipHint')} label={t('common.infoHint')} />
143
141
  <input
144
142
  ref={fileInput}
145
143
  type="file"
@@ -172,12 +170,9 @@ export function MyConfigsWizard({
172
170
  <Badge kind="ok">{t('myconfigs.upload.validateOk')}</Badge>
173
171
  </div>
174
172
  )}
175
- {/* ⓘ 走 info 属性(它是标签的一部分),不再当 children 塞进字段体内:塞进去就等于
176
- 把它放进了 <label>,悬停/点击标签会连带作用到 ⓘ 上(Field 现在按 info 有无降级外壳)。 */}
177
- <Field
178
- label={t('myconfigs.upload.form.name')}
179
- info={<InfoHint text={t('myconfigs.upload.form.nameHint')} label={t('common.infoHint')} />}
180
- >
173
+ {/* 说明文案走 Field 的 tooltip(挂在标签上),不塞进字段体内:塞进去等于放进 <label>,
174
+ 悬停/点击标签会连带作用到说明上。 */}
175
+ <Field label={t('myconfigs.upload.form.name')}>
181
176
  <input
182
177
  className={css.input}
183
178
  aria-label={t('myconfigs.upload.form.name')}
@@ -195,8 +190,8 @@ export function MyConfigsWizard({
195
190
  {/* F6 发布模式:迁移(全带)/ 分享(自动排除敏感分区 + 强制隐私拦截)—— 复用既有 conflictOptions/radioLabel 单选样式 */}
196
191
  <Field
197
192
  label={t('myconfigs.upload.mode.title')}
198
- info={wizard.form.publishMode === 'share'
199
- ? <InfoHint text={t('myconfigs.upload.mode.shareHint')} label={t('common.infoHint')} />
193
+ tooltip={wizard.form.publishMode === 'share'
194
+ ? t('myconfigs.upload.mode.shareHint')
200
195
  : undefined}
201
196
  >
202
197
  <div className={css.conflictOptions}>
@@ -38,7 +38,6 @@ export const zh = {
38
38
  'list.sortStars': '⭐ 最多',
39
39
  'list.sortName': '名称 A–Z',
40
40
  'list.stars': '⭐ {count}',
41
- 'list.starsHint': '来源仓库 star 数(仓库级,非本条目)',
42
41
  'list.count': '共 {count} 个条目',
43
42
  'list.filtered': '(筛选后 {count} 个)',
44
43
  'list.cacheCached': '已缓存',
@@ -136,7 +135,6 @@ export const zh = {
136
135
  'myconfigs.upload.validateSecrets': '包含密钥:市场通道永不携带秘密,拒绝上传',
137
136
  'myconfigs.upload.validateInvalid': '内容校验未通过,无法上传',
138
137
  'myconfigs.upload.form.name': '名称',
139
- 'myconfigs.upload.form.nameHint': '预填 zip 文件名,可修改',
140
138
  'myconfigs.upload.form.description': '描述(可选)',
141
139
  'myconfigs.upload.form.categories': '类别(可选,逗号分隔)',
142
140
  'myconfigs.upload.form.autoTitle': '自动生成',
@@ -149,7 +147,6 @@ export const zh = {
149
147
  'myconfigs.update.title': '更新配置',
150
148
  'myconfigs.update.hint': '版本自动 +1',
151
149
  'myconfigs.update.run': '一键更新',
152
- 'myconfigs.update.zipHint': '选择新 zip 后自动校验,通过才能更新。',
153
150
  'myconfigs.update.selectZip': '选择新 ZIP…',
154
151
  // 上传/更新结果卡
155
152
  'myconfigs.result.title': '上传/更新完成',
@@ -225,7 +222,6 @@ export const en: Record<keyof typeof zh, string> = {
225
222
  'list.sortStars': 'Most starred',
226
223
  'list.sortName': 'Name A–Z',
227
224
  'list.stars': '⭐ {count}',
228
- 'list.starsHint': 'Stars of the source repo (repo-level, not per item)',
229
225
  'list.count': '{count} {count, plural, item|items}',
230
226
  'list.filtered': '({count} after filter)',
231
227
  'list.cacheCached': 'cached',
@@ -316,7 +312,6 @@ export const en: Record<keyof typeof zh, string> = {
316
312
  'myconfigs.upload.validateSecrets': 'Contains secrets: the market channel never carries secrets — upload rejected',
317
313
  'myconfigs.upload.validateInvalid': 'Content validation failed — cannot upload',
318
314
  'myconfigs.upload.form.name': 'Name',
319
- 'myconfigs.upload.form.nameHint': 'Prefilled from the zip file name; editable',
320
315
  'myconfigs.upload.form.description': 'Description (optional)',
321
316
  'myconfigs.upload.form.categories': 'Categories (optional, comma-separated)',
322
317
  'myconfigs.upload.form.autoTitle': 'Generated',
@@ -328,7 +323,6 @@ export const en: Record<keyof typeof zh, string> = {
328
323
  'myconfigs.update.title': 'Update config',
329
324
  'myconfigs.update.hint': 'version +1 automatically',
330
325
  'myconfigs.update.run': 'Update',
331
- 'myconfigs.update.zipHint': 'Pick a new zip and it will be validated automatically; only a passing zip can be installed.',
332
326
  'myconfigs.update.selectZip': 'Choose new ZIP…',
333
327
  'myconfigs.result.title': 'Upload/update complete',
334
328
  'myconfigs.result.version': 'version {version}',
@@ -22,7 +22,8 @@ const MAIN = 'MyConfigsView.tsx';
22
22
  const PARTS: readonly { file: string; component: string; markers: readonly string[] }[] = [
23
23
  { file: 'MyConfigsLoginCard.tsx', component: 'MyConfigsLoginCard', markers: ['renderDeviceCode', 'myconfigs.login.userCode'] },
24
24
  { file: 'MyConfigsWizard.tsx', component: 'MyConfigsWizard', markers: ['css.hiddenFile', 'css.radioLabel', 'Modal.Body'] },
25
- { file: 'MyConfigsList.tsx', component: 'MyConfigsList', markers: ['css.snapshotList', 'css.rowActions'] },
25
+ // T-05 按设计稿重排行结构后,列表段特征类名从 statRow/snapshotList/rowActions 换成自有类(2026-11-13)
26
+ { file: 'MyConfigsList.tsx', component: 'MyConfigsList', markers: ['css.marketMyItemList', 'css.marketMyItemActions'] },
26
27
  { file: 'MyConfigsInstall.tsx', component: 'MyConfigsInstall', markers: ['marketDetailView(', 'detailView.canImport'] },
27
28
  ];
28
29
 
@@ -0,0 +1,52 @@
1
+ /**
2
+ * nav-menu-clip-guard — 导航条「更多 ▾」的弹层不得被祖先裁剪(2026-11-14 真机 bug)。
3
+ *
4
+ * 为什么需要它:MoreMenu 的弹层是**留在原地的 absolute**(契约见 common/MoreMenu.tsx ①,
5
+ * 不 portal),祖先链 `.navStrip → .shellNav → .section` 任何一级写 `overflow`(或 `contain: paint`、
6
+ * `clip-path`)都会把它切掉。真机表现:小视口下页签挤进「更多 ▾」,点开**什么都不显示** ——
7
+ * 菜单只剩分隔条下沿那一条,正是 `.navStrip` 早先那条「防极端情况」的 `overflow: hidden` 干的。
8
+ *
9
+ * 这条不变量没法被 typecheck / build 发现,所以按源码级断言钉住(与 css-scale-guard 同一套做法):
10
+ * - `.navStrip` / `.shellNav` 不得出现任何裁剪声明;
11
+ * - 兜底必须存在:`.section` 仍是 `overflow: hidden`(画布边界兜住宿主布局,
12
+ * 量测失败时的横向溢出也由它裁在插件画布内)。
13
+ * 去注释后再断言:注释里会写「不写 overflow: hidden」,不能把它当成违规。
14
+ */
15
+ import test from 'node:test'
16
+ import assert from 'node:assert/strict'
17
+ import fs from 'node:fs'
18
+ import path from 'node:path'
19
+
20
+ const ROOT = path.resolve(import.meta.dirname, '../..')
21
+ const CSS = fs.readFileSync(path.join(ROOT, 'src/client/config-manager.module.css'), 'utf8')
22
+ .replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '))
23
+
24
+ /** 取某个**单选择器**规则体(`.x {` 开头,到第一个 `}` 行结束)。 */
25
+ function ruleBody(selector: string): string {
26
+ const head = '\n' + selector + ' {'
27
+ const at = CSS.indexOf(head)
28
+ assert.ok(at >= 0, `CSS 里找不到 ${selector} 的规则块`)
29
+ const end = CSS.indexOf('\n}', at)
30
+ assert.ok(end > at, `${selector} 的规则块没有闭合`)
31
+ return CSS.slice(at, end)
32
+ }
33
+
34
+ /** 会裁剪后代的声明:overflow 家族 + 两种等价手段。 */
35
+ const CLIPPING = /^\s*(overflow(-[xy])?|contain|clip-path)\s*:/m
36
+
37
+ for (const selector of ['.navStrip', '.shellNav']) {
38
+ test(`${selector}: 不得裁剪「更多 ▾」弹层`, () => {
39
+ assert.doesNotMatch(
40
+ ruleBody(selector), CLIPPING,
41
+ `${selector} 一旦裁剪,「更多 ▾」的 absolute 弹层会被切成一条(见本文件头)。` +
42
+ '需要兜住溢出时改由 .section 承担。',
43
+ )
44
+ })
45
+ }
46
+
47
+ test('.section: 仍是唯一的溢出兜底', () => {
48
+ assert.match(
49
+ ruleBody('.section'), /^\s*overflow\s*:\s*hidden\s*;/m,
50
+ '.section 的 overflow: hidden 是「量测失败时横向溢出不外泄」的唯一兜底,别删。',
51
+ )
52
+ })
@@ -13,7 +13,6 @@
13
13
  import { useState } from 'react'
14
14
 
15
15
  import { Badge, Banner, Button, Card } from '../common/ui.tsx'
16
- import { InfoHint } from '../common/InfoHint.tsx'
17
16
  import { redact } from '../../security/redaction.ts'
18
17
  import css from '../config-manager.module.css'
19
18
  import type { TranslateNS } from '../client-types.ts'
@@ -75,8 +74,7 @@ export function IncompleteCopiesSection(props: IncompleteCopiesSectionProps) {
75
74
  return (
76
75
  <Card>
77
76
  <div className={css.statRow}>
78
- <strong>{t('recovery.incomplete.title')}</strong>
79
- <InfoHint text={t('recovery.incomplete.hint')} label={t('common.infoHint')} />
77
+ <strong title={t('recovery.incomplete.hint')}>{t('recovery.incomplete.title')}</strong>
80
78
  <Badge kind="warn">{String(rows.length)}</Badge>
81
79
  </div>
82
80
  <div className={css.snapshotList}>