Skip to content

feat: Added a Refresh button to the owner console's logs - #220

Merged
Kkkermit merged 1 commit into
developfrom
testify/feature-27
Nov 13, 2026
Merged

Kkkermit merged 1 commit into
developfrom
testify/feature-27

Conversation

@Kkkermit

Copy link
Copy Markdown
Owner

What this changes

  • A Refresh button on the owner console's Logs tab (/owner?tab=logs), beside Pause and Clear. It reads the run shown and the run list again at once. That covers the run going now, live or paused, and a past run, which otherwise keeps what it read for a minute. While it reads, the button says "Refreshing…" with a spinning icon.
  • It says how it went, in a status line beside the buttons (RefreshLogs):
    • Success: "Refreshed at 15:18:12." in green, clearing after five seconds.
    • Failure: "Couldn’t refresh the logs. The log store is busy. The lines shown were read at 15:18:12." in red, with the server's own reason (describe from ErrorState). It stays until a later read of the lines works.
  • Lines already read stay on screen when a later read fails. The tab used to swap them for an error page on any failed read, the five-second timer's included. The error page now shows only when nothing has been read yet, for the lines and for the run list alike. A failure on the timer is said in the same red line, so a stale list never looks current.
  • Five new strings in all eight languages, and a sentence in AGENTS.md §24 under the log history.

Why

A paused feed and a past run held what they first read, with no way to bring them up to date short of switching tabs or reloading. A failed read also hid the lines already on screen, on the one screen meant for when things are going wrong.

How to verify

  • npm run check passes locally with 4,048 tests; the 30 database suites are skipped there. CI was still running on the branch when this was opened.
  • New tests in OwnerAnalytics.test.tsx:
    • Refresh brings in a line the first read did not have, and shows the success note.
    • A refresh the API answers with a 500 shows the reason and when the lines were read, and keeps the lines.
    • Three mutations each turned a test red: Refresh not reading, the failure never shown, and the error page replacing the lines.
  • In Chromium against the Vite dev server with fixture data, at 1280px and 390px: the success and failure notes both showed, the lines stayed after a failure, nothing scrolled sideways and the page threw nothing. The failure note appears after about 3.4 seconds, because the query client retries a 5xx twice before giving up.
  • On a running bot: open /owner?tab=logs, press Pause, press Refresh, and the newest lines appear with "Refreshed at …". Not tried against a live bot.

Checklist

  • The branch is cut from develop, and this pull request targets develop
  • npm run check passes
  • Tests cover the new behaviour, and were shown to fail without it
  • No read-modify-save() on numeric fields
  • Embeds come from the embed() factory
  • No raw console.*
  • Every promise is awaited or handled
  • No new timers registered with the bot (the five-second note is a browser timeout, cleared on unmount)
  • No new custom IDs
  • No new environment variables
  • No command changed, so docs/commands.md is unchanged
  • Every new string is in all eight dictionaries
  • Documentation updated: AGENTS.md §24

Generated by Claude Code

@Kkkermit
Kkkermit merged commit 0c1fab2 into develop Nov 13, 2026
8 checks passed
@Kkkermit
Kkkermit deleted the testify/feature-27 branch November 13, 2026 15:29
@Kkkermit Kkkermit mentioned this pull request Nov 13, 2026
13 of 15 tasks
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