Skip to content

fix(kb): hide the storage usage bar for legacy (Classic) KBs - #1110

Merged
DerrickF merged 1 commit into
developfrom
fix/hide-usage-bar-legacy
Sep 14, 2026
Merged

DerrickF merged 1 commit into
developfrom
fix/hide-usage-bar-legacy

Conversation

@DerrickF

Copy link
Copy Markdown
Contributor

Problem

The KB storage usage bar shows "0 B stored" on every Classic (legacy S3-Vectors) agent, even when it has real documents. Byte tracking is scoped to managed KBs (Req 12.11): a legacy KB reports cap=null and zeroed counters, so the bar has nothing meaningful to show and reads as a bug to users.

Reported in dev: a Classic agent with two 129 KB docs still showed "0 B stored".

Fix

Gate showUsageBar on the managed engine rather than merely "kbUsage is present":

showUsageBar = mode() === 'edit' && kbUsage()?.engine === 'managed'
  • Managed KBs: unchanged — bar still shows "X of Y used" against the cap.
  • Legacy/Classic KBs: bar hidden entirely; per-document sizes remain the storage signal.

The legacy label/level computeds are left intact (harmless, and keep the bar re-enable-able) — only visibility changes.

Tests

  • New spec: showUsageBar() is false and no [role=progressbar] renders for a legacy KB in edit mode.
  • Existing managed / create-mode / uncapped-label specs unchanged.

Frontend specs run under Angular/karma in CI (not locally runnable in this env, same as the usage-bar PR #1108) — relying on the Test frontend + coverage jobs.

Byte tracking is scoped to managed KBs (Req 12.11), so a legacy KB reports
zeroed counters and cap=null. The usage bar therefore rendered '0 B stored'
beside real documents on every Classic agent, which reads as a bug.

Gate showUsageBar on the managed engine (kbUsage.engine === 'managed')
instead of merely 'kbUsage is present'. Managed KBs are unaffected; legacy
KBs show only per-document sizes. Adds a spec asserting the bar (and its
progressbar element) is absent for a legacy KB in edit mode.
@DerrickF
DerrickF merged commit 6832929 into develop Sep 14, 2026
6 checks passed
@DerrickF
DerrickF deleted the fix/hide-usage-bar-legacy branch September 14, 2026 22:17
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