Skip to content

feat(test): make decidesk reproducibly testable in nextcloud-docker-dev #139

Open

Description

@rubenvdlinde

Summary

Bringing decidesk up in a fresh `nextcloud-docker-dev` environment hit four independent setup problems before the app could render anything. None of them are visible from CI; all are dev-env quirks the next person will trip over. Track them here so we can either ship fixes or document the workarounds in `README.md` / `docs/getting-started.md`.

What we hit (all four required to get decidesk rendering)

1. `SettingsService::loadConfiguration()` dropped two arguments (✅ fixed in PR #138)

`importFromApp` was being called with named args `appId` + `force`, but the openregister signature is `(appId, data, version, force)`. Result: import returned an empty success and no data was ever loaded.

2. `lib/Settings/decidesk_register.json` had no `components.registers` block (✅ fixed in PR #138)

The importer creates registers from `data.components.registers[*]`. Without a register entry binding the schemas, every `/api/objects?register=decidesk` returned 404 ("Register not found: 'decidesk'"). Procest, opencatalogi, pipelinq all have this block; decidesk did not.

3. `src/main.js` — missing bootstrap calls + brittle `loadTranslations` (✅ fixed in PR #138)

Per `@conduction/nextcloud-vue`'s CLAUDE.md, every consumer must call `registerIcons({})` + `registerTranslations()` before mount. Decidesk wasn't.

`loadTranslations('decidesk', mount)` also rejected on a missing per-locale `l10n/.json` and silently dropped the mount callback — leaving `#content` empty for users on locales without a shipped translation file. Now wrapped `.catch().then(mount)` so a 404 in the locale file no longer blocks boot.

4. `webpack.config.js` — `USE_LOCAL_LIB=1` mode was broken (✅ fixed in PR #138)

Two sub-issues:

  • No `scss` rule on `vue-loader`. `@conduction/nextcloud-vue`'s `CnCard.vue` ships `<style lang="scss">`. `sass-loader` was already in `node_modules` but unregistered → unresolved `Module parse failed: Unexpected token`.
  • `output.publicPath` defaulted to `/apps//js/` (from `@nextcloud/webpack-vue-config`). The dev container serves bind-mounted apps from `/custom_apps//`, so dynamically-loaded chunks (Dashboard.vue etc.) returned `text/html` from NC's index controller and failed with `MIME type ('text/html') is not executable`. Now `output.publicPath = 'auto'` so chunks resolve from `document.currentScript.src`.

Out of scope (handled in their own repo)

  • The `PHP Fatal: Cannot redeclare ::$mail` from openregister's `Organisation.php` blocked every API call until fixed: openregister PR.
  • The Dutch translation files exist in `l10n/nl.json` (development) but Apache's `.htaccess` doesn't serve `.json` from `/custom_apps/`, so they 404. Workaround in main.js (graceful degrade); proper fix is an env-level NC config change.

Suggested follow-ups

  • Document the `USE_LOCAL_LIB=1` flow in `README.md` (or `docs/getting-started.md`) once PR feat(manifest): Tier 2 pilot — route Decisions through CnPageRenderer #138 lands so the next person sees the alias steps + the `occ maintenance:repair --include-expensive` command up front.
  • Add a `make dev-bootstrap` (or equivalent npm script) that does the four steps: `USE_LOCAL_LIB=1 npm run dev` → `apache2ctl graceful` → `occ maintenance:repair --include-expensive` → set admin locale to en when running on a base image without nl translations.
  • CI smoke test: a Playwright run that loads `/apps/decidesk/decisions` in the dev container, asserts `.cn-page-renderer[data-page-id="Decisions"]` mounts, asserts the empty state. Catches all four problems above on every PR.

Related

  • decidesk PR #138 — fixes 1-4 above
  • nextcloud-vue#89 — manifest renderer (the change being piloted)
  • nextcloud-vue#90 — auto-wire useListView in CnPageRenderer (eliminates the wrapper-component pattern decidesk currently uses for `type: "custom"`)

Activity

  1. self-assigned this
    on Apr 28, 2026
  2. rubenvdlinde commented on May 19, 2026

    @rubenvdlinde
    ContributorAuthor

    Status as of 2026-05-19: still open. Four setup issues for fresh nextcloud-docker-dev repro have not been individually addressed in decidesk PRs (recent PRs #218–#226 are brand/preset/lockfile sync, not the dev-setup repro path). Worth re-scoping against the current state of the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions