mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 07:39:53 +08:00
The SettingsReadinessPanel component returned null whenever its
`enabled` prop was false. The prop is wired to catalogEditable in
SettingsOverview, which means any signed-in user without edit rights on
the model catalog — every learner account, every assigned role on a
multi-user install — saw nothing where the rest of the team saw
"what is ready, what is broken, what is folded away".
Read-only users still benefit from seeing readiness:
- The data is informational, not actionable.
- They have the same LLM and same parser behind the scenes, and
they deserve the same "endpoint is unreachable / misconfigured"
signal an editor sees, so they can ask an admin to fix it.
Keep `enabled` as the gate on user-facing controls only:
- The manual refresh button is disabled when !enabled.
- The "Open" link on each attention row is hidden when !enabled.
This also unblocks the Playwright audit at
tests/e2e/settings-navigation.audit.ts, which mocks
/api/settings/readiness and expects the section to render the mocked
matrix. On dev/CI the catalogEditable path is not reached (no real
backend), so the panel returned null and the audit failed. The same
gate was masking this failure on dev: the previous CI step
(npm run perf:check) exited non-zero before the audit ran, so dev has
been red here since PR #1201 was merged.
Verified locally: typecheck passes (only the unrelated missing-node-
types warning); existing settings-readiness Node tests still pass.