Skip to content

Release v0.6.1: M2A deep-path test & robustness hardening (#68)#69

Merged
smartlabsAT merged 5 commits into
mainfrom
feature/68-m2a-deep-path-test-gaps
Jun 13, 2026
Merged

Release v0.6.1: M2A deep-path test & robustness hardening (#68)#69
smartlabsAT merged 5 commits into
mainfrom
feature/68-m2a-deep-path-test-gaps

Conversation

@smartlabsAT

Copy link
Copy Markdown
Owner

Closes #68.

Follow-up to #67 (v0.6.0): closes the deferred test-coverage and robustness gaps in the M2A deep-path template feature. No functional behavior change — pure hardening, two tiny robustness fixes, and unit coverage. Verified live + adversarially reviewed.

Changes

Refactor / robustness (production code, behavior-preserving)

  • Extract resolveUserLanguage(userStore) into a pure, typed helper (UserStoreLike/UserLike) and use it at both call sites (EditableCellRelational.vue, useLanguageSelector.ts), dropping the as any casts. Behavior identical at both sites (incl. the '' / null / undefined paths).
  • buildQueryFingerprint: normalize sort to ?? null (consistent with filter/deep/alias) and canonicalize nested object key order via a typed stableReplacer (null- and array-guarded; arrays keep their order). The fingerprint is a dedup-only comparison key — it never forms the wire query.
  • Document the coalesce reject invariant and the api listing-search path (comments only).

Tests (close the #68 gaps, no duplication of existing coverage)

  • resolveUserLanguage: set / null / null-store / share-without-language / empty-string.
  • buildQueryFingerprint: nested key reorder -> equal; reorder inside array elements -> equal; array element order significant -> differs; deep value change -> differs; sort null vs undefined -> equal.
  • Non-default translation language field (junction_field: 'lang') at the render (renderM2ATemplate) and query-expansion (expandTokensThroughRelation) levels — "detected, not hardcoded languages_code".
  • Deep M2O chains: pure M2O -> M2O -> scalar resolve, and validateDeepPath M2O -> M2O -> invalid-leaf naming the deepest collection.
  • listPickerFields: single file drillable (directus_files); to-many files / o2m omitted.

Out of scope (deferred): the super-table.vue consolidation items (#8/#9 in the issue) are structural refactors and belong in a separate issue. No version bump (left for the next release).

Verification

  • vitest: 404/404 (16 added on this branch). vue-tsc, ESLint --max-warnings=0, Prettier — all green. (The one timing-based useExistingLanguageDetection > should be performant flake passes on retry; pre-existing, untouched here.)
  • Live Playwright regression against Directus 11.11.0 (M2A nested-translation preset): nested-translation render (de-DE / en-US / no-suffix -> user-language -> first-row fallback), invalid-token graceful degradation (dedup warn, no 403), M2O-chain, native-search-drives-layout and single items+count fetch pair — all identical to pre-change; zero console errors.
  • Adversarial code review of the diff: merge-ready, no critical/important findings.

Test plan

  • Unit suite green (incl. new tests)
  • type-check / lint / format green
  • Live render regression (nested translations, language variants)
  • Invalid-token graceful degradation (no 403)
  • Search wiring + single fetch pair unchanged
  • No console errors

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown

Quality Check Results

TypeScript Type Check

Passed - No type errors found

ESLint

Passed - No linting errors

Prettier Format Check

Passed - Code is properly formatted

Build

Passed - Extension builds successfully


Updated: 2026-06-13T10:53:03.024Z

@smartlabsAT smartlabsAT changed the title Issue #68: close M2A deep-path test & robustness gaps Release v0.6.1: M2A deep-path test & robustness hardening (#68) Jun 13, 2026
@smartlabsAT smartlabsAT merged commit ebc149f into main Jun 13, 2026
22 checks passed
@smartlabsAT smartlabsAT deleted the feature/68-m2a-deep-path-test-gaps branch June 13, 2026 11:05
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.

Follow-up #67: close test/robustness gaps in M2A deep-path resolution (v0.6.0)

1 participant