Skip to content

feat(identity-stub): share the identity stub builder; typeLabel reads a bare fleet-ops type - #87

Merged
roncodes merged 4 commits into
release/v0.2.3from
feat/identity-stub-and-type-label
Oct 11, 2026
Merged

roncodes merged 4 commits into
release/v0.2.3from
feat/identity-stub-and-type-label

Conversation

@roncodes

@roncodes roncodes commented Oct 9, 2026

Copy link
Copy Markdown
Member

What change does this PR introduce?

Follow-up to #86, carrying the three commits that were pushed to its branch after it merged:

  • utils/identity-stub.js (buildIdentityStub) moves here from FleetOps so other extensions can build a stand-in record for a relation a row only knows by name (driver_name, pickupName), with its own unit tests. The Storefront change merged as feat(identity): render drivers, customers, vehicles and places through the shared identity components storefront#120 already imports @fleetbase/fleetops-data/utils/identity-stub, so Storefront's orders tables fail to build against the published package until this lands and is released.
  • typeLabel('fleet-ops:contact') reads "Contact" instead of "Fleet ops"; Storefront orders carry that customer type, and its customer pill surfaced the wart.
  • extensionManager() guards the universe service's lazy manager lookup, which throws on a host without one, so canOpen stays false instead of failing.

Why was this change needed?

A consumer already depends on the stub module, and the two descriptor fixes were found by the Storefront rendering tests.

Other information

Validation: 1107 tests, 0 failures. Every file under addon/ is at 100% on all four coverage metrics. In this workspace the global gate percentages are dragged down by @fleetbase/ember-core files that get instrumented through the console's pnpm store; CI installs this package alone and should not see them (noted on #86 as well).

The FleetOps follow-up re-exports the stub from this package once it is released.

…urvive a universe without an extension manager

typeLabel('fleet-ops:contact') read as "Fleet ops"; the part after the colon is
the type when nothing precedes the extension prefix. extensionManager() now
guards the universe service's lazy manager lookup, which throws on a host
that has none, so canOpen stays false instead of failing.
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (46dcae2) to head (c4d843f).

Additional details and impacted files
@@               Coverage Diff                @@
##           release/v0.2.3       #87   +/-   ##
================================================
  Coverage          100.00%   100.00%           
================================================
  Files                 120       121    +1     
  Lines                3123      3148   +25     
  Branches              765       773    +8     
================================================
+ Hits                 3123      3148   +25     
Flag Coverage Δ
fleetops-data 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
addon/utils/identity-stub.js 100.00% <100.00%> (ø)
addon/utils/resource-descriptors/helpers.js 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46dcae2...c4d843f. Read the comment docs.

🚀 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.

…rop the engine keyword

In the console build the addon-tree hbs-only wrappers were never compiled: ember-cli-htmlbars only
colocates an addon's templates when it finds ember-cli-babel among that addon's child addons, and
fleetops-data (a plain addon flagged ember-engine, shared by the host and two lazy engines) lost
that lookup, so every .js module shipped while all 32 wrapper components vanished and engines
failed with 'Could not find module .../components/cell/vehicle-identity'. App-tree templates are
compiled by each consumer (host, fleetops, storefront) in its own namespace, which is what the
wrappers are for.
@roncodes

Copy link
Copy Markdown
Member Author

Added a fix to this branch: the 32 identity wrappers now live as app/components/**/*.hbs templates and the ember-engine keyword is gone from package.json.

Why: in the console build the addon-tree hbs-only wrappers were never compiled. ember-cli-htmlbars colocates an addon's templates only when it finds ember-cli-babel among that addon's child addons; fleetops-data, a plain addon flagged ember-engine and shared by the host and two lazy engines, lost that lookup. Every .js module shipped, all 32 wrapper components vanished, and engines failed at runtime with Could not find module @fleetbase/fleetops-engine/components/cell/vehicle-identity. App-tree templates are compiled by each consumer in its own namespace, which is exactly what these wrappers are for. Restart ember serve after pulling: package metadata changed.

@roncodes
roncodes merged commit 423f108 into release/v0.2.3 Oct 11, 2026
5 checks passed
@roncodes
roncodes deleted the feat/identity-stub-and-type-label branch October 11, 2026 03:56
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.

1 participant