feat(ai): admin disabled-teaser for AI actions when LLM unconfigured (LC-506) #473

Merged
longjacksonle merged 4 commits from feat/LC-506-llm-admin-teaser into main 2026-06-28 03:49:41 +02:00

What

When the optional LLM endpoint (LETS_CHAT_LLM_URL) is unconfigured, the AI actions used to be hidden from everyone, so nobody discovered the feature existed. Now site admins see the AI controls as a disabled teaser with a "set it up" hint, while regular members still see nothing. No behavior change when the LLM is configured.

Scope

  • Room header "Catch me up" button: an {% else if llm_teaser %} branch renders a disabled, no-hx button with a data-lc-tip tooltip pointing at LETS_CHAT_LLM_URL. Recomputed on the notify-prefs header swap so it survives the inline update.
  • Transcript "Summarize" block: same disabled teaser when the LLM is unset and the viewer is a site admin and the transcript has lines.
  • New i18n key ai-needs-setup (en + es).
  • .lc-action-disabled CSS: dimmed, default cursor, no hover affordance.

llm_teaser = !state.llm_available() && user.role == "admin". The teaser carries no hx-* attributes and uses aria-disabled (not the disabled attribute) so the hover tooltip still renders while the control does nothing.

Not included

The per-message "Translate" item is CSS-gated with no per-message view flag, so showing an admin teaser there would mean threading a flag through all 17 MessageView constructors. Left hidden for now.

Checks

just check, just test, just test-saas, just build-css all pass.

## What When the optional LLM endpoint (`LETS_CHAT_LLM_URL`) is unconfigured, the AI actions used to be hidden from everyone, so nobody discovered the feature existed. Now site admins see the AI controls as a disabled teaser with a "set it up" hint, while regular members still see nothing. No behavior change when the LLM is configured. ## Scope - Room header "Catch me up" button: an `{% else if llm_teaser %}` branch renders a disabled, no-hx button with a `data-lc-tip` tooltip pointing at `LETS_CHAT_LLM_URL`. Recomputed on the notify-prefs header swap so it survives the inline update. - Transcript "Summarize" block: same disabled teaser when the LLM is unset and the viewer is a site admin and the transcript has lines. - New i18n key `ai-needs-setup` (en + es). - `.lc-action-disabled` CSS: dimmed, default cursor, no hover affordance. `llm_teaser = !state.llm_available() && user.role == "admin"`. The teaser carries no `hx-*` attributes and uses `aria-disabled` (not the `disabled` attribute) so the hover tooltip still renders while the control does nothing. ## Not included The per-message "Translate" item is CSS-gated with no per-message view flag, so showing an admin teaser there would mean threading a flag through all 17 `MessageView` constructors. Left hidden for now. ## Checks `just check`, `just test`, `just test-saas`, `just build-css` all pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
style(ai): dim/no-hover styling for disabled AI teaser controls (LC-506)
All checks were successful
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / TruffleHog (push) Successful in 5s
Check / clippy + fmt + tests (pull_request) Successful in 3m10s
check-secrets / Kingfisher (push) Successful in 4s
check-secrets / Nosey parker (pull_request) Successful in 3s
check-secrets / TruffleHog (pull_request) Successful in 4s
check-secrets / Kingfisher (pull_request) Successful in 6s
Create release / Create release from merged PR (pull_request) Has been skipped
0bf2f493be
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/LC-506-llm-admin-teaser 2026-06-28 03:49:41 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!473
No description provided.