fix(docs): doc tree limit + version gate (local CLI vs remote server)#159
Merged
Conversation
uteke-serve /doc/list defaults limit to 5 (shared memory pagination default). The doc tree fetches the full flat list client-side to build the hierarchy, so omitting limit silently capped it at 5 docs. Side effect: parent folders whose children fell outside the first 5 results had an empty childrenCache, so isFolder evaluated false and no expand/collapse chevron rendered — the tree could not be toggled. Default to 1000 in the Tauri command so the installed uteke 0.7.0 works without waiting for the upstream default fix (uteke #634).
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-cli · BYOK · MIT |
Bump MIN_UTEKE_FOR_DOCS from 0.7.0 to 0.7.1. Symptom: deleting a document failed with "uteke error: server returned 400 Bad Request". Root cause: uteke 0.7.0 has no /doc/delete route — document delete/move landed in 0.7.1. The old gate (0.7.0) let Corin run against an incomplete server and surface a confusing 400. Raising the gate to 0.7.1 makes require_uteke_version reject 0.7.0 up front with a clear message, and the Documents view renders its upgrade banner so the user runs uteke upgrade (0.7.1 is released) and gets the full doc feature set. Comments referencing the old 0.7.0 floor updated across lib/commands/ uteke_client. Added a docs_gate_requires_0_7_1 test.
The documents version gate read AppState::uteke_version, which is the LOCAL 'uteke --version' CLI output. When Corin connects to a remote uteke-serve (https/host URL), the local CLI version is irrelevant — the server may be older or newer — yet the gate compared against the CLI and falsely told remote users to 'run uteke upgrade'. Now: - Track AppState::uteke_remote (set from is_remote_url at startup). - resolve_uteke_version() probes the remote server's self-reported version via GET /health (uteke >= health-version patch) and falls back to the cached CLI version for local servers. - require_uteke_version / uteke_version_status treat a remote server with an UNKNOWN version leniently (allow through, no upgrade banner) — remote servers are user-managed and surface real errors directly. Local servers keep the strict gate. - uteke_self_update skips the local CLI upgrade for remote servers and just re-probes the server version. Depends on upstream /health version field (uteke #636) for precise remote detection; without it, remote-unknown is handled leniently so remote users are no longer blocked.
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems
uteke error: server returned 400 Bad Request.uteke upgradeeven when connected to a remote server that was fine.Root causes
uteke-servePOST /doc/listdefaultslimitto 5. The tree fetches the full flat list client-side → silently capped.isFolder=false→ no chevron rendered. Toggle logic itself (Svelte 5\$stateSet/Map) is healthy.uteke 0.7.0has no/doc/deleteroute (added in 0.7.1). The docs gate (MIN_UTEKE_FOR_DOCS = 0.7.0) let Corin hit a missing route.uteke --versionCLI output even for remote servers — meaningless, since the remote server may be older or newer than the CLI.Fixes
doc_listTauri command defaultslimitto 1000 → fixes (1) and (2) against installed uteke 0.7.0.MIN_UTEKE_FOR_DOCS → 0.7.1→ (3) rejects 0.7.0 up front with a clear message and shows the upgrade banner;uteke upgradefetches 0.7.1 (released) which has/doc/delete.AppState::uteke_remote;resolve_uteke_version()probes the server's version viaGET /healthfor remote connections (falls back to local CLI for local servers). Remote + unknown version → lenient (allow through, no banner) since remote servers are user-managed.uteke_self_updateskips the local CLI upgrade for remote → fixes (4).Dependencies / related
/doc/listdefault fix: fix(server): raise /doc/list default limit from 5 to 1000 uteke#634 (merged)/healthversion field: feat(server): report version in /health response uteke#636 (enables precise remote detection; without it, remote-unknown is handled leniently so remote users are no longer blocked)Files
src-tauri/src/commands.rs—AppState::uteke_remote,resolve_uteke_version(), remote-awarerequire_uteke_version/uteke_version_status/uteke_self_update;doc_listdefault limit 1000;MIN_UTEKE_FOR_DOCSdoc updates.src-tauri/src/lib.rs— setuteke_remoteat startup;MIN_UTEKE_FOR_DOCS = "0.7.1";docs_gate_requires_0_7_1test.src-tauri/src/uteke_client.rs—server_version()via/health.Checks
cargo fmt/cargo clippy -D warnings✅cargo test— 14 passed ✅svelte-check— 0 errors ✅vitest— 60 passed ✅