feat(developer-tools): add Developer menu with Style Lab, iDevice Lab, REST API#35
Open
erseco wants to merge 1 commit into
Open
feat(developer-tools): add Developer menu with Style Lab, iDevice Lab, REST API#35erseco wants to merge 1 commit into
erseco wants to merge 1 commit into
Conversation
…, REST API Add a dev-only Developer dropdown to the workarea navbar containing three entries: Style Lab, iDevice Lab, and REST API. The REST API entry is moved out of the (hidden) Help menu so the canonical Swagger access point lives here. All routes return 404 in production; visibility is gated on APP_ENV=dev with an optional DEV_TOOLS_ENABLED override for staging. What is in this MVP: * Backend: src/utils/developer-tools.util.ts (isDeveloperToolsEnabled + DeveloperToolEntries) and src/routes/developer.ts wiring /developer/style-lab, /developer/idevice-lab, /developer/api into both the root and BASE_PATH mounts. Both files have full spec coverage. * Shared frontend kernel under public/app/workarea/developer/shared/: DeveloperUrlState (sanitized query-param state), ViewportManager (desktop/tablet/mobile presets), FixtureRegistry, ExportPresetManager, DeveloperStatusReporter (data-status + JSON state), RoundtripValidator (save -> load -> save diff). Every module has colocated Vitest specs. * Style Lab + iDevice Lab pages with stable data-testid attributes, deterministic URL state, machine-readable state JSON, and Page Objects for Playwright at test/e2e/playwright/pages/developer.page.ts. * doc/development/developer-tools.md documents architecture, automation surface, fixture manifests, and known limitations. Reused assets: fixture manifest entries reference .elpx files from the authorized exelearning-style-designer repository; the actual fixtures are not committed here (placeholders + README explaining where they go). Known limitations (called out in the doc + UI): * Style Lab preview iframe is wired but not yet hooked to Html5Exporter.generateForPreview() + Service Worker. The integration point is DeveloperPreviewManager (next PR). * iDevice Lab edition/export views render their containers; the iDevice mount step lives in IdeviceSandbox follow-up work. * SCORM debug panel ships as a labeled simulator only. * Reload-from-disk emits a state token; backend filesystem reload route is the next step. Test plan: * bun test ./src/routes/developer.spec.ts ./src/utils/developer-tools.util.spec.ts -> 23 pass, 0 fail * npx vitest run public/app/workarea/developer/ -> 104 pass, 0 fail * bun test ./src/routes/pages.spec.ts -> 86 pass (no regression) * make lint -> clean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a dev-only Developer dropdown to the workarea navbar containing three
entries: Style Lab, iDevice Lab, and REST API. The REST API entry is moved
out of the (hidden) Help menu so the canonical Swagger access point lives
here. All routes return 404 in production; visibility is gated on
APP_ENV=dev with an optional DEV_TOOLS_ENABLED override for staging.
What is in this MVP:
DeveloperToolEntries) and src/routes/developer.ts wiring
/developer/style-lab, /developer/idevice-lab, /developer/api into both
the root and BASE_PATH mounts. Both files have full spec coverage.
DeveloperUrlState (sanitized query-param state), ViewportManager
(desktop/tablet/mobile presets), FixtureRegistry, ExportPresetManager,
DeveloperStatusReporter (data-status + JSON state), RoundtripValidator
(save -> load -> save diff). Every module has colocated Vitest specs.
deterministic URL state, machine-readable state JSON, and Page Objects
for Playwright at test/e2e/playwright/pages/developer.page.ts.
surface, fixture manifests, and known limitations.
Reused assets: fixture manifest entries reference .elpx files from the
authorized exelearning-style-designer repository; the actual fixtures are
not committed here (placeholders + README explaining where they go).
Known limitations (called out in the doc + UI):
Html5Exporter.generateForPreview() + Service Worker. The integration
point is DeveloperPreviewManager (next PR).
mount step lives in IdeviceSandbox follow-up work.
is the next step.
Test plan:
-> 23 pass, 0 fail