webui(chat): raw 501 error banner when update-check is unconfigured #950

Closed
opened 2026-10-27 13:38:25 +00:00 by sam · 0 comments
Owner

The Chat page shows a raw "501 Not Implemented" banner across the top when the release-update-check feature isn't configured. POST /api/chat/update correctly returns 501 when chat.telegram.update_check_command is unset in config (cmd/archied/telegram_setup.go makeUpdateService returns nil in that case, which is a legitimate, expected "not configured" state -- same category as an unconfigured channel).

The bug is in the frontend's handling of that response. ui/src/chat/chat.js refreshUpdate() is called unconditionally on page load (line ~365) with no guard, and its catch block does:

} catch (err) {
  updatePanel.replaceChildren(el("span", err.message || "Updates unavailable"));
}

This renders the raw fetch error text (including the literal HTTP status) directly into a visible page banner, rather than treating "updates not configured" as a quiet empty state -- the same pattern already used for an unconfigured channel on the Channels page ("Not configured", not an error).

Expected

A 501/"not configured" response from /api/chat/update should render nothing (or a subtle "update checks not configured" note), not a raw HTTP error banner.

Screenshot: Chat page, banner reading "501 Not Implemented" directly under the top status bar.


Imported from beads archie-core-1786637500953-422-01075562 · GitHub #443 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08

The Chat page shows a raw "501 Not Implemented" banner across the top when the release-update-check feature isn't configured. `POST /api/chat/update` correctly returns 501 when `chat.telegram.update_check_command` is unset in config (`cmd/archied/telegram_setup.go` `makeUpdateService` returns nil in that case, which is a legitimate, expected "not configured" state -- same category as an unconfigured channel). The bug is in the frontend's handling of that response. `ui/src/chat/chat.js` `refreshUpdate()` is called unconditionally on page load (line ~365) with no guard, and its catch block does: ```js } catch (err) { updatePanel.replaceChildren(el("span", err.message || "Updates unavailable")); } ``` This renders the raw fetch error text (including the literal HTTP status) directly into a visible page banner, rather than treating "updates not configured" as a quiet empty state -- the same pattern already used for an unconfigured channel on the Channels page ("Not configured", not an error). ### Expected A 501/"not configured" response from `/api/chat/update` should render nothing (or a subtle "update checks not configured" note), not a raw HTTP error banner. Screenshot: Chat page, banner reading "501 Not Implemented" directly under the top status bar. --- _Imported from beads `archie-core-1786637500953-422-01075562` · GitHub #443 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumbug labels 2026-10-27 13:38:25 +00:00
sam self-assigned this 2026-10-27 13:38:25 +00:00
sam closed this issue 2026-10-27 13:38:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#950