Skip to content

feat(logs): page through game files and pod output - #945

Open
Baylem wants to merge 4 commits into
masterfrom
feat/log-scrollback
Open

Baylem wants to merge 4 commits into
masterfrom
feat/log-scrollback

Conversation

@Baylem

@Baylem Baylem commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Read earlier game-file and pod output in pages of up to 100 lines and 64 KiB. File cursors pin the file and byte boundary. Pod cursors pin a timestamped record, pod UID and container instance, with bounded kubelet reads and explicit discontinuities.
  • Page back into completed setup containers using the selected cluster and server permissions. File reads use the existing UID-bound agent transport.
  • Offer Earlier output even for a short log. Open the live console immediately and display its independent pod snapshot separately, with a notice that the two streams can overlap or have gaps.

Verification

  • Linux agent log package, including file replacement, truncation, appends and long UTF-8 records.
  • API pod history, cluster guards and websocket package, including 600 writes between pages, same-name pod replacement, container restart and completed init containers.
  • Dashboard Logs, Console and fixture suites (46 tests), end-to-end TypeScript check and the Vite production bundle. Chrome exercised loading an older page while live output continued. Both updated Pencil screens passed the visual comparison and pseudo-locale clipping checks.

Closes #936

Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem
Baylem requested a review from ValgulNecron as a code owner November 12, 2026 05:19
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e3826d8 and a604e58.

Files ignored due to path filters: 3

  • assets/design-export/screenshots/Xn5ns.png is excluded by !**/*.png
  • assets/design-export/screenshots/kPmoo.png is excluded by !**/*.png
  • design.pen is excluded by !**/*.pen
Files selected for processing: 28

  • agent/internal/logs/history_linux.go
  • agent/internal/logs/history_test.go
  • agent/internal/logs/logs.go
  • agent/openapi.yaml
  • agent/specs.md
  • api/docs/openapi.yaml
  • api/internal/gatewayprotocol/protocol.go
  • api/internal/handlers/cluster_guard_test.go
  • api/internal/ws/cluster_guard_test.go
  • api/internal/ws/dialer.go
  • api/internal/ws/multicluster_test.go
  • api/internal/ws/pod_history.go
  • api/internal/ws/pod_history_test.go
  • api/internal/ws/podlogs.go
  • api/specs.md
  • assets/design-export/json/Xn5ns.json
  • assets/design-export/json/kPmoo.json
  • changelog/unreleased/936-log-history.md
  • i18n/locales/en/app.json
  • web/e2e/screenshots/slice2a.spec.ts
  • web/specs.md
  • web/src/lib/endpoints.ts
  • web/src/routes/tabs/Console.test.tsx
  • web/src/routes/tabs/Console.tsx
  • web/src/routes/tabs/LogHistory.tsx
  • web/src/routes/tabs/Logs.test.tsx
  • web/src/routes/tabs/Logs.tsx
  • web/src/test/handlers.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Baylem Baylem added area: agent in-pod sidecar area: api REST/WebSocket gateway area: web React dashboard type: feature New capability or user-facing addition labels Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

CI Report - 64bbdb8

run 43164150076 - attempt 1

0 failed - 1 passed - 6 skipped - 26 cancelled - 10m52s elapsed

Test selection: partial - per-suite table

Coverage

no coverage/* commit statuses found on 64bbdb8

Changed

Area Files +/-
api/ 10 +565/-5
agent/ 5 +564/-5
web/ 9 +197/-4
(root) 1 +119/-1
assets/ 4 +118/-0
i18n/ 1 +40/-0
changelog/ 1 +3/-0

Slowest jobs

Job Duration
build e2e images 6m29s
vuln (go) 6m29s
docs and repository checks 6m29s
dependency review 6m29s
web e2e (mock) 6m29s

e2e buckets run

bot-fast, multicluster, upgrade

@Baylem Baylem left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed file cursors, pod and container identity, and the transition from history to live output. Tests cover an append between pages, copy-truncation during a read, repeated lines at a boundary, a large record followed by a short recent line, and bounded WebSocket replay. The Linux log-reader and API WebSocket suites passed. The Console and Logs Pencil exports show the history controls.

The file cursor can detect a change in the verified byte window. Rewriting an identical window on the same inode is indistinguishable to the reader.

@Baylem Baylem self-assigned this Nov 12, 2026
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agent in-pod sidecar area: api REST/WebSocket gateway area: web React dashboard type: feature New capability or user-facing addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bounded log history and console backlog across live updates

1 participant