Skip to content

chore: cover the editor bridge and SW client, tighten tooling, sync docs - #129

Merged
erseco merged 1 commit into
refactor/remove-dead-codefrom
chore/tests-tooling-docs
Sep 26, 2026
Merged

erseco merged 1 commit into
refactor/remove-dead-codefrom
chore/tests-tooling-docs

Conversation

@erseco

@erseco erseco commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Stack 5/5, based on #127.

What

  • Tests: new Vitest suites for:

    • EditorFrame: request-id routing, error replies, timeouts, ignoring foreign message sources
    • service-worker-client: activation, shared registration, session messages, posting failures
    • elpx-loader: filename and ETag parsing, fallbacks

    These modules now count toward the 90% coverage threshold, and the codecov.yml ignores for them are removed. Coverage is 98.6% lines and 93.5% branches.

  • Routes: the asset route requires a numeric sessionId, so 12abc no longer casts to 12.

  • Biome: biome.json now points at the installed 2.5.14 schema.

  • Docs:

    • AGENTS.md and DEVELOPMENT.md now have the right SW path, skill name, save flow and sandbox flags, and no longer mention the unused @nextcloud/viewer.
    • Stale comments about webpack, the Viewer handler and /editor are fixed.

Not in scope

Choosing between Biome and ESLint, since both lint src/ today.

Verification

composer install                 exit 0
npm install                      exit 0
npm run typecheck                exit 0
npm test                         Tests 143 passed (143)
npm run lint                     exit 0
npm run build                    ✓ built
make architecture-check          Architecture records OK — 3 records, 0 changes.
make -n download-editor … typecheck   exit 0
vendor/bin/phpunit               OK (115 tests, 311 assertions)
composer cs:check                Found 0 of 32 files that can be fixed
git diff --check                 clean

- Add Vitest suites for EditorFrame (request-id routing, error replies,
  timeouts, foreign-origin messages), service-worker-client (activation,
  shared registration, session messages) and elpx-loader (filename and
  etag parsing), and count those modules toward the 90% threshold.
- Require a numeric id on the asset route instead of casting '12abc' to 12.
- Point biome.json at the installed Biome 2.5.14 schema.
- AGENTS.md, DEVELOPMENT.md and comments: correct the SW path, skill name,
  save flow, sandbox flags, and stop referring to @nextcloud/viewer,
  webpack and the removed /editor page.
@github-actions

Copy link
Copy Markdown
Contributor

Preview this PR in the Nextcloud Playground

Open this PR in the Nextcloud Playground

A fresh Nextcloud boots in your browser with this branch's exelearning app installed and enabled (log in as admin / admin). Two sample .elpx are seeded under exelearning-samples/ in Files — click one to open the viewer.

eXeLearning editor: v4.0.5 (overlaid at boot from the upstream release).

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (refactor/remove-dead-code@90a25be). Learn more about missing BASE report.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             refactor/remove-dead-code     #129   +/-   ##
============================================================
  Coverage                             ?   93.81%           
  Complexity                           ?      149           
============================================================
  Files                                ?       25           
  Lines                                ?      776           
  Branches                             ?       89           
============================================================
  Hits                                 ?      728           
  Misses                               ?       35           
  Partials                             ?       13           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erseco
erseco added this pull request to stack #130 September 26, 2026 06:14
@erseco
erseco merged commit 9d1429e into main Sep 26, 2026
16 checks passed
@erseco
erseco deleted the chore/tests-tooling-docs branch September 26, 2026 06:44
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.

2 participants