Skip to content

Cross-app id: the frontend still hardcodes old app ids (404 on half the fleet) #580

Description

@rubenvdlinde

The PHP half of the cross-app id fix is shipping (openregister #2867, learniq #616, pipelinq #1437, shillinq #1252) via a FleetAppId resolver that picks the id the instance actually registered from a newest-first list.

The frontend half is not fixed, because JavaScript cannot ask IAppManager.

Remaining hardcoded sites

app file pinned path
launchpad src/services/spendAnalytics.js:218 /apps/openconnector/api/sources/{source}/call
pipelinq src/main.js:218 /apps/openbuild/api/app-overrides/pipelinq
pipelinq src/App.vue:203 /apps/openbuild/api/app-overrides/pipelinq
learniq src/App.vue:18-19 /apps/openconnector/api/lti/..., /apps/openconnector/api/payments/...

Why it matters

A URL segment is a routing key — Nextcloud mounts routes under the registered app id. development has completed the rename (integriq, buildiq), while beta and main still register the old ids. So each of these paths is a 404 on half the fleet, and a 404 from a background fetch is not something anyone sees.

Suggested fix

The PHP side already knows the answer. Provide it to the frontend rather than duplicating the map in JS:

// in the app's PageController / Application bootstrap
$this->initialState->provideInitialState(
    'fleetAppIds',
    [
        'integriq' => FleetAppId::resolve($this->appManager, 'integriq'),
        'buildiq'  => FleetAppId::resolve($this->appManager, 'buildiq'),
    ]
);
import { loadState } from '@nextcloud/initial-state'
const ids = loadState('<app>', 'fleetAppIds', {})
const url = generateUrl(`/apps/${ids.integriq ?? 'integriq'}/api/sources/{source}/call`, { source })

That keeps a single source of truth (appinfo/info.xmlFleetAppId → initial state) and degrades to the canonical id if the state is absent.

Not in scope

  • OpenRegister register slugs stay frozen — they are literals already written into stored data.
  • Docblock/comment mentions of old ids are not executable and need no change.

Once beta and main carry the new ids everywhere, FleetAppId and this plumbing should both be deleted — they are transitional shims, not architecture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions