Skip to content

feat(eda): log retention Phase 2 UI — paginated logs, DEBUG toggle, clear logs - #3462

Open
B-Whitt wants to merge 3 commits into
ansible:develfrom
B-Whitt:feat/AAP-77938-log-retention-phase2-ui
Open

B-Whitt wants to merge 3 commits into
ansible:develfrom
B-Whitt:feat/AAP-77938-log-retention-phase2-ui

Conversation

@B-Whitt

@B-Whitt B-Whitt commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • Frontend companion to eda-server PR #1650 (Phase 2 backend)
  • Three UI stories, each in its own commit:
    1. Paginated log loading — replaces unbounded page_size={count} with capped initial load (5000 newest, reversed for chronological), timestamp-based polling for new logs, and scroll-back for history
    2. DEBUG warning + checkbox — warning alert when DEBUG log level is selected; store_debug_logs checkbox to opt in to DB storage of DEBUG lines
    3. Clear Logs buttons — "Clear logs" on History tab (per-activation), "Clear all logs" on Activations list (superuser only)

Changes

  • frontend/eda/rulebook-activations/ActivationInstancePage/ActivationInstanceEvents.tsx — rewrote log fetching with timestamp pagination
  • frontend/eda/rulebook-activations/RulebookActivationForm.tsx — DEBUG warning alert + store_debug_logs checkbox
  • frontend/eda/interfaces/EdaRulebookActivation.ts — added store_debug_logs to create type
  • frontend/eda/rulebook-activations/RulebookActivationPage/RulebookActivationHistory.tsx — per-activation clear logs button
  • frontend/eda/rulebook-activations/hooks/useRulebookActivationsActions.tsx — global clear all logs action (superuser only)

Test Plan

  • TypeScript compiles with zero errors (npx tsc --noEmit --project frontend/eda/tsconfig.json)
  • Manual: verify paginated log loading against running EDA instance with backend PR deployed
  • Manual: verify DEBUG warning appears/disappears when toggling log level
  • Manual: verify Clear Logs buttons show confirmation and report deleted count

Dependencies

  • Requires eda-server PR #1650 for log_timestamp__gt/log_timestamp__lt filters, store_debug_logs field, and purge API endpoints

Jira

Resolves: AAP-83306, AAP-84685, AAP-84684
Parent: AAP-77938

Replaces the unbounded page_size={count} pattern that fetches ALL logs
in one request (causing OOM on large activations) with:
- Initial load: fetch newest 5000 logs, reverse for chronological display
- Polling: log_timestamp__gt for new logs every 5s while running
- Scroll-back: log_timestamp__lt for older history on scroll to top

Resolves: AAP-83306
Assisted by: Claude Opus 4.6
…ion form

Shows a warning alert when DEBUG log level is selected, explaining the
storage impact. Adds a store_debug_logs checkbox (visible only at DEBUG
level) that controls whether DEBUG lines are persisted to the database.
The checkbox resets to false when switching away from DEBUG.

Resolves: AAP-84685
Assisted by: Claude Opus 4.6
Adds "Clear logs" button on the activation History tab (per-activation)
and "Clear all logs" on the Activations list page (superuser only).
Both show a confirmation dialog and display a toast with the deleted
count.

Resolves: AAP-84684
Assisted by: Claude Opus 4.6

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Risk Analysis is required. Please select a risk level (High, Medium, or Low) in the PR description under Risk Analysis - REQUIRED.

@github-actions github-actions Bot added community Community contribution from fork EDA Changes in frontend/eda size/L Large PR missing-risk-analysis PR missing risk analysis and removed community Community contribution from fork labels Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@B-Whitt — The following PR checks have failed:

  • ❌ eslint
  • ❌ prettier
  • ❌ All checks passed

Please address these failures.

@github-actions github-actions Bot added the waiting-on-author PR requires author attention label Aug 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
33.6% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

@github-actions

Copy link
Copy Markdown
Contributor

@B-Whitt — SonarQube Quality Gate failed:

  • Coverage on New Code: 33.6%

Please address the SonarQube findings.

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

Labels

EDA Changes in frontend/eda missing-risk-analysis PR missing risk analysis size/L Large PR waiting-on-author PR requires author attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant