Skip to content

feat(compat): uteke compatibility gate + namespace management UI - #306

Merged
ajianaz merged 4 commits into
developfrom
feat/compat-gate
Sep 5, 2026
Merged

ajianaz merged 4 commits into
developfrom
feat/compat-gate

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

What

Two slices on one branch (shared compat foundation):

  1. compat.ts (Redesign compatibility gate — min uteke version map + runtime feature detection (epic) #289) — uteke server compatibility gate: serverVersion() (via docs.versionStatus(), 60s cache), has(feature) / gatedFeatures() semver compare, _resetCompatCache() test hook. Compatibility map: graphEdgeWrite / namespaceMove / namespaceManage all ≥ 0.16.1 (uteke #1182 graph FK fix, #1183 namespace management — merged in uteke develop, not yet released).

  2. NamespaceManager (Namespace UX: switcher + filter chips + read-only management table (gated actions) #297) — Settings → Workspace:

    • Table: name + active/deprecated breakdown (falls back to total count on old servers)
    • Rename/merge dialog: single atomic update; existing target = merge ({from,to,moved,target_existed})
    • Delete with explicit strategy: refuse (safest, 409 if memories exist) / merge into target / deprecate (soft-delete, restorable until TTL) — never hard-delete
    • All actions disabled with honest tooltip when the server is older (compat gate); default namespace protected
    • Live-tested against a uteke develop sandbox build: move, rename→merge (moved: 2, target_existed: true), breakdown fields, delete strategy all verified through the app's own /api proxy

Why

Namespaces are a derived column (no CRUD pre-0.16.1). UI ships now but stays honest about capability: disabled + upgrade hint instead of fake buttons (#289 contract). Fixes the "wrong namespace" mistake class with one-click move/merge.

Testing

  • tsc clean; 91/91 tests (5 new compat tests); build green
  • Journey gate: {failures: []} exit 0
  • Live API round-trips verified (see above); vision-reviewed screenshots (table + upgrade badge render correctly on 0.16.0)

Requires uteke: 0.16.0+ (table) / ≥ 0.16.1 (management actions, from #1183). Refs: #297, #289

- compat.ts: serverVersion() via docs.versionStatus() (60s cache),\n  has(feature)/gatedFeatures() semver compare, _resetCompatCache test hook\n- Map: graphEdgeWrite + namespaceMove + namespaceManage all >= 0.16.1\n  (#1182 graph FK fix, #1183 namespace management - merged in uteke\n  develop, unreleased)\n- 5 unit tests (91 total green), tsc clean\n\nPart of #289, epic ref.
- NamespaceManager.svelte in Settings > Workspace: table with\n  active/deprecated breakdown (falls back to total on old servers),\n  rename/merge dialog (atomic update; existing target = merge),\n  delete with explicit strategy (refuse / merge into / deprecate)\n- All actions disabled with honest "needs uteke >= 0.16.1" tooltip when\n  the compat gate reports an older server (default ns protected)\n- compat.ts (#289) drives the gate via docs.versionStatus()\n\nAPI contract verified live against uteke develop build (sandbox):\nPUT /memory {namespace}; POST /namespaces/rename -> {from,to,moved,\ntarget_existed}; /namespaces/delete {strategy} -> {affected};\nwith_counts breakdown {active, deprecated}. Merge round-trip: moved 2.\n\nLocal gates: tsc clean, 91/91 tests, build green, journey 0 failures.\n\nPart of #297, epic #289. Requires uteke >= 0.16.1 (management), 0.16.0+ (table).
Comment thread src/lib/components/settings/NamespaceManager.svelte Fixed
Comment thread src/lib/components/settings/NamespaceManager.svelte Fixed
Comment thread src/lib/ts/compat.ts Fixed
@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

…gatedFeatures null semantics

- Rename button now guarded for the protected default workspace too\n  (server-side rename moves ALL memories out of )\n- rename/delete go through docs.namespaceRename/namespaceDelete ipc\n  (transport-aware) instead of raw fetch to /api/*\n- gatedFeatures(): null when server unknown — callers can't claim support\n- Verified: tsc clean, 91/91 tests, build green, journey 0 failures\n\nAddresses 3 code-scanning alerts on this PR.
const enriched: NamespaceRow[] = [];
for (const name of raw) {
try {
const s = await memoryApi.stats(name);
#306 scan alert)

- docs.namespacesBreakdown(): single GET /namespaces?with_counts=true\n  (active/deprecated fields present on 0.16.1+; older servers return\n  totals only and the UI falls back gracefully)\n- load() no longer issues N serial stats calls\n\n91/91 tests, tsc clean, build green, journey gate 0 failures.
@ajianaz
ajianaz merged commit 0655f5a into develop Sep 5, 2026
16 checks passed
@ajianaz
ajianaz deleted the feat/compat-gate branch September 5, 2026 14:50
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.

2 participants