Skip to content

feat: debug recorder in Admin with a settings toggle [WTEL-11037](https://webitel.atlassian.net/browse/WTEL-11037) - #1725

Draft
dlohvinov wants to merge 4 commits into
mainfrom
feat/WTEL-11037/debug-recorder
Draft

dlohvinov wants to merge 4 commits into
mainfrom
feat/WTEL-11037/debug-recorder

Conversation

@dlohvinov

@dlohvinov dlohvinov commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Connects the client-side debug recorder (@webitel/ui-sdk/modules/DebugRecorder, webitel/webitel-ui-sdk#2105) to the Admin app and adds the switch for it in settings.

  • src/app/debug-recorder.ts calls installDebugRecorder({ app: 'admin', version }). It is the first import in main.ts, so it wraps WebSocket/fetch/console before anything else loads.
  • Settings → General → "Debug recording" (settings-general-debug-recorder.vue, built on useDebugRecorder()):
    • the switch turns recording on for 24 h in every webitel app of the site and starts it here right away;
    • it shows when recording ends and how many events are stored, hints to reload the other open tabs, and has Download archive;
    • switching it off stops recording everywhere and deletes the data.
    • Texts are in all nine client languages (en, uk, ru, es, kz, pl, ro, uz, vi).
  • Logout needs nothing here: the SDK Userinfo store runs the recorder's cleanup hook.
  • No Vite config changes. On Vite 7 dev the recorder writes from the main thread (no freeze detection); production builds load its worker. Do not exclude the module from optimizeDeps: with the chip built on SDK components it breaks lazy routes in dev.

?debug=1 still works in any app, for when settings are unreachable (white screen, broken sign-in).

Merge order

  1. Merge feat: DebugRecorder module — one debug archive for all apps [WTEL-11037](https://webitel.atlassian.net/browse/WTEL-11037) webitel-ui-sdk#2105 and wait for the @webitel/ui-sdk release.
  2. Here: npm i @webitel/ui-sdk@<that version> and commit the lockfile. Until then CI installs a release without the module and the build fails.

Verification

Done locally, with the SDK branch linked into node_modules (--install-links style):

  • typecheck shows 0 errors, unit tests pass (196/196), biome is clean.

Browser checks, with Admin and Workspace served on one origin, as in production:

  • the switch in settings starts recording right away;
  • Admin → Workspace → Admin ends up in one webitel-debug-*.zip, with page loads per app and clean transitions;
  • switching it off stops a second, Workspace tab and deletes the store.

Not verified: the real logout. Testing it would sign the tester out of the test stand. The hook is covered by SDK unit tests.

Related

🤖 Generated with Claude Code

…/webitel.atlassian.net/browse/WTEL-11037)

installDebugRecorder({ app: 'admin' }) as the first import in main.ts, wipe on
logout in the header. Dev: the module is served as source so its worker loads
on Vite 7. Needs a ui-sdk release with webitel/webitel-ui-sdk#2105.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… SDK [WTEL-11037](https://webitel.atlassian.net/browse/WTEL-11037)

Settings → General gets a "Debug recording" section (useDebugRecorder from
@webitel/ui-sdk): switching it on records for 24 h in every webitel app of the
site and starts right away here; the archive can be downloaded from there.
The manual wipe in the header is gone: the Userinfo store now runs the
recorder's logout hook itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dlohvinov dlohvinov changed the title feat: connect DebugRecorder from @webitel/ui-sdk [WTEL-11037](https://webitel.atlassian.net/browse/WTEL-11037) feat: debug recorder in Admin with a settings toggle [WTEL-11037](https://webitel.atlassian.net/browse/WTEL-11037) Nov 23, 2026
dlohvinov and others added 2 commits November 23, 2026 14:24
…s://webitel.atlassian.net/browse/WTEL-11037)

es, kz, pl, ro, uz, vi next to en/uk/ru.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…037](https://webitel.atlassian.net/browse/WTEL-11037)

With the REC chip built on SDK components, excluding the module makes Vite
re-optimize deps after the page started and breaks lazy routes in dev. On
Vite 7 dev the recorder now writes from the main thread (no freeze detection);
production is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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