Skip to content

CnDetailPage: _lockState setup() variable starts with underscore (Vue 2 strict mode rejects) #318

Description

@rubenvdlinde

Symptoms

Open any type:'detail' page in a Vue 2 host (e.g. pipelinq/clients/:id with current beta) — console reports:

[Vue warn]: Avoid using variables that start with _ or $ in setup().
[Vue warn]: Property or method "_lockState" is not defined on the instance but referenced during render.

The sidebar (and the locked-by banner template referenced at line 64) silently fail to render because Vue 2's setup() strips _-prefixed return values — treats them as private/non-reactive.

Root cause

src/components/CnDetailPage/CnDetailPage.vue:

  • Line 64-66 template references _lockState.locked.value, _lockState.lockedBy.value, _lockState.expiresAt.value
  • Line 316: return { ...registryExposed, _lockState: null }
  • Line 335: _lockState: lock

Per the Vue 2 setup-API contract: variables prefixed with _ or $ are reserved.

Suggested fix

Rename _lockState → lockState (or lockStateRef if a name clash) in all 6 occurrences in CnDetailPage.vue. I verified this locally by patching the installed lib in pipelinq: the Vue warning disappears after the rename and the CnDetailPage scaffold renders cleanly through to the body / sidebar mount point.

After the rename, the sidebar still doesn't materialise (<!----> comments only) — that's a separate issue I'll triage and file if it doesn't reproduce on a fresh demo app.

Repro

  1. pipelinq#429 (currently open) ships a fully Ajv-valid v2 manifest with explicit widgets[] on 9 detail pages.
  2. Build pipelinq against @conduction/nextcloud-vue@^1.0.0-beta.64 and visit /apps/pipelinq/clients/:any-uuid.
  3. Observe the _lockState Vue warnings + empty CnDetailPage body.

Severity

High — affects every v2 manifest detail page (the sidebar-with-tabs is the primary way detail pages show object data). Pre-existing in the lib (not caused by tonight's #294-#317 work) but surfaced when manifests use the new typed shapes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions