Skip to content

feat(framework): fix the bugs Admin Shell and module UIs work around (VCST-6926) - #422

Merged
maksimzinchuk merged 6 commits into
mainfrom
fix/VCST-6926-shell-workarounds
Nov 26, 2026
Merged

maksimzinchuk merged 6 commits into
mainfrom
fix/VCST-6926-shell-workarounds

Conversation

@maksimzinchuk

@maksimzinchuk maksimzinchuk commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Admin Shell and the module UIs work around vc-shell bugs in their own code: a yarn patch of the built framework, a mixin that rewrites component props through Vue internals, :root:root token overrides, their own guards. This fixes those bugs in vc-shell, so the workarounds can be removed module by module (VCST-6926).

What

Data loss and wrong data

  • Switching to another menu section asks before closing blades with unsaved changes. If the user keeps them, the address does not change.
  • useBlade().closeChildren(action) closes the child blades, then runs the action. When the user keeps a child open (unsaved changes), the action is skipped and the call resolves false, without an exception. Asking for confirmation inside the action puts the unsaved-changes question first.
  • useBlade().closeChildren() without an action stops the caller when the user keeps a child blade open: it rejects with BladeCloseCancelledError, so the delete, move or reload after await closeChildren() does not run. The 59 module calls need no change. The global error handlers, useErrorHandler and useAsync treat it as a cancel (no toast, no banner); isBladeCloseCancelled() is exported. useBladeStack().closeChildren(id) returns a boolean for infrastructure such as breadcrumbs.
  • VcTextarea no longer cuts text at 1024 characters unless maxlength is set.
  • downloadFile ignores javascript: and other non-download schemes.
  • CellMoney shows 0 as an amount, not "Not set".
  • VcDynamicProperty: multi-value text chips show their values; Color respects disabled.
  • VcDataTable does not emit row-click when the click opens a cell editor.
  • Closing a child blade no longer clears the parent's AI agent context.

Navigation and module loading

  • A deep link to a module blade keeps its address while modules load. mf-host then replays it with force: true: Vue Router skips a navigation to the current location, guards included, so the replay never ran before.
  • usePopup works outside setup.
  • An embedded app hides the environment banner.
  • Mobile back button: one named button instead of a button inside a button (the fix Admin Shell's yarn patch applies today).

Translations and accessibility

  • Components fall back to translated texts instead of English defaults (table search, mobile cards, skeleton, progress, sidebar, dashboard grid, editor).
  • Widget titles and dashboard widget names are translated when they are keys; dashboard keyboard announcements are translated.
  • The published locales/types.d.ts quotes keys that are not identifiers, so it parses.
  • VcCard header leaves clicks and Enter/Space in its actions to those controls; dashboard feed rows open from the keyboard.
  • VcEditor gets a contentType prop ("html" | "markdown"). Without it an empty HTML field was saved as Markdown.

Look and theming

  • Token declarations (:root { --x: … } rules) go into the vc-shell cascade layer through a small PostCSS plugin. An app's plain :root now overrides them whatever order the stylesheets load in, without :root:root or !important.
  • VcStatus is as wide as its text in a table cell.
  • A blade without commands or widgets shows no empty toolbar strip.
  • The sign-in card stands out from the page in the dark theme.
  • Dashboard widgets stack at full width on phones (the saved layout is not touched).
  • The assets folder grid uses logical sides for RTL.

Heads-up

  • Switching the menu section with unsaved changes now asks; before, the changes were lost silently.
  • An app's plain :root { --token: … } now overrides vc-shell's tokens whatever order the stylesheets load in. An override that used to lose to the framework's CSS by load order now applies, so such an app may look different.
  • VcTextarea has no 1024-character limit by default.
  • Shell texts that used to fall back to English now follow the UI language.
  • No module has to change: every module workaround keeps working on this version (checked with all 53 module UIs). Removing them is cleanup.
  • New public API: closeChildren(action); VcEditor contentType; BladeCloseCancelledError and isBladeCloseCancelled(); useBladeStack().closeChildren(id) returns a boolean (was void).
  • useBlade().closeChildren() now rejects when the user keeps a child blade open, where it used to resolve and let the caller go on. Code that wraps it in try/catch sees the cancel in its catch; none of the 59 module calls does.
  • 4 new keys in the shell texts plus 9 dashboard texts; 13 of the 15 languages of the dashboard texts need a native speaker's review.

Checks

  • typecheck, lint, stylelint, locales, circular, layers, docs lint
  • Unit tests: 5988 pass. Four files (useConnectionStatus, useNotificationStore, useSlowNetworkDetection timeouts, and the VcScheduler style test when run from the repo root) fail only under the full parallel run and pass on their own, same as on main
  • Storybook: VcStatus, dark sign-in, blade without toolbar, dashboard at 390px, RTL folder grid, a plain :root override placed before the framework CSS
  • Admin Shell on a local platform with sample data and all 53 module UIs, before (2.13.0) and after (this branch): 44 screens at 1440 and 390px are pixel-identical apart from data, no console errors; the unsaved-changes prompt on a menu switch, multi-value property chips and deep links to module blades were checked by hand. Deleting a catalog from the list while its details blade has unsaved changes, answering Cancel: 2.13.0 deletes the catalog anyway, this branch keeps it and shows no error

Data loss and wrong data:
- Switching to another menu section asks before closing blades with unsaved changes, and the address stays put when the user keeps them
- closeChildren() returns true when a child blade stays open, like closeSelf()
- VcTextarea no longer cuts text at 1024 characters by default
- downloadFile ignores javascript: and other non-download URL schemes
- CellMoney shows 0 as an amount, not as "Not set"
- VcDynamicProperty: multi-value text chips show their values; Color respects disabled
- VcDataTable does not emit row-click when a click opens a cell editor
- Closing a child blade no longer clears the parent's AI agent context

Navigation and module loading:
- A deep link to a module blade keeps its address while modules load, and mf-host replays it with force so the guard runs again
- usePopup works outside setup
- An embedded app hides the environment banner
- Mobile back button: one named button instead of a button inside a button

Translations and accessibility:
- Components fall back to translated texts instead of English defaults
- Widget titles and dashboard widget names are translated when they are keys; dashboard announcements are translated
- The published locales/types.d.ts quotes keys that are not identifiers
- VcCard header leaves clicks and Enter/Space in its actions to those controls; dashboard feed rows open from the keyboard
- VcEditor gets a contentType prop, so an empty HTML field is not saved as Markdown

Look and theming:
- Token declarations go into the vc-shell cascade layer, so an app's plain :root overrides them in any stylesheet order
- VcStatus is as wide as its text; an empty toolbar strip is hidden; the sign-in card stands out in the dark theme; dashboard widgets stack on phones; the assets folder grid uses logical sides for RTL

Refs VCST-6926
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

📦 Preview published for commit 62522c9

Install the preview with dist-tag:

npm install @vc-shell/framework@pr-422

Or pin to the exact commit:

npm install @vc-shell/framework@2.13.1-pr422.62522c9

Published packages (dist-tag pr-422, version 2.13.1-pr422.62522c9):

  • @vc-shell/framework
  • @vc-shell/api-client-generator
  • @vc-shell/create-vc-app
  • @vc-shell/config-generator
  • @vc-shell/migrate
  • @vc-shell/ts-config
  • @vc-shell/mf-config
  • @vc-shell/mf-host
  • @vc-shell/mf-module
  • @vc-shell/vc-app-skill

…ade open

The modules call `await closeChildren()` and then delete, move or overwrite the record the
child blade edits (59 calls, none checks a result). A boolean result fixed nothing until every
module changed. When the user keeps a child blade open, useBlade().closeChildren() now rejects
with BladeCloseCancelledError, so the code after it does not run. The global error handlers,
useErrorHandler and useAsync treat it as a cancel: no toast, no blade banner, no log.
isBladeCloseCancelled() is exported for code that wants to react to the cancel.

useBlade().closeChildren() returns Promise<void> again; useBladeStack().closeChildren(id)
keeps its boolean for infrastructure such as breadcrumbs.

Refs VCST-6926
…ren close

useBlade().closeChildren() takes an optional action. It closes the child blades, then runs the
action; when the user keeps a child open, the action is skipped and the call resolves false,
without an exception. Asking for confirmation inside the action puts the unsaved-changes
question first.

closeChildren() without an action keeps rejecting with BladeCloseCancelledError, the safety
net for existing code that deletes or overwrites the record on its next line.

Refs VCST-6926
@maksimzinchuk maksimzinchuk changed the title fix(framework): fix the bugs Admin Shell and module UIs work around (VCST-6926) feat(framework): fix the bugs Admin Shell and module UIs work around (VCST-6926) Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant