Skip to content

fix: remove misleading 'Since Last Shutdown' from active sessions title (#1072)#1074

Open
microsasa wants to merge 3 commits intomainfrom
fix/1072-active-section-title-4592161bd5805d96
Open

fix: remove misleading 'Since Last Shutdown' from active sessions title (#1072)#1074
microsasa wants to merge 3 commits intomainfrom
fix/1072-active-section-title-4592161bd5805d96

Conversation

@microsasa
Copy link
Copy Markdown
Owner

Summary

_render_active_section_from in report.py hardcoded the table title "🟢 Active Sessions (Since Last Shutdown)" for all active sessions — including pure-active sessions that have never had a shutdown event (has_shutdown_metrics=False).

This changes the title to "🟢 Active Sessions" unconditionally (Option A from the issue). The columns already indicate what data is being shown; the parenthetical qualifier only added confusion for pure-active sessions.

Changes

  • src/copilot_usage/report.py: Change table title from "🟢 Active Sessions (Since Last Shutdown)" to "🟢 Active Sessions"
  • tests/copilot_usage/test_report.py: Update existing resumed-session test to assert absence of qualifier; add new test_pure_active_section_title_no_since_last_shutdown test
  • tests/e2e/test_e2e.py: Update _ACTIVE_MARKER constant to match new title

Closes #1072

Warning

⚠️ Firewall blocked 3 domains

The following domains were blocked by the firewall during workflow execution:

  • astral.sh
  • index.crates.io
  • pypi.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "astral.sh"
    - "index.crates.io"
    - "pypi.org"

See Network Configuration for more information.

Generated by Issue Implementer · ● 10M ·

The active-sessions table title in _render_active_section_from hardcoded
'Since Last Shutdown', which is inaccurate for pure-active sessions
(has_shutdown_metrics=False) that have never had a shutdown event.

Change the title to '🟢 Active Sessions' unconditionally (Option A from
issue #1072). The columns already convey what data is being shown.

- Update existing resumed-session test to assert absence of qualifier
- Add new test for pure-active sessions verifying no 'Since Last Shutdown'
- Update e2e _ACTIVE_MARKER constant to match new title

Closes #1072

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 15:02
@microsasa microsasa added the aw Created by agentic workflow label Apr 24, 2026
@microsasa microsasa enabled auto-merge April 24, 2026 15:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the misleading “Since Last Shutdown” qualifier from the Active Sessions table title so it is accurate for both resumed sessions and pure-active sessions.

Changes:

  • Update the Rich table title in the interactive summary active section to “🟢 Active Sessions”.
  • Adjust unit tests to assert the qualifier is absent, and add a regression test for pure-active sessions.
  • Update the e2e active-section marker to match the new title text.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/copilot_usage/report.py Updates the active sessions table title to remove the “Since Last Shutdown” qualifier.
tests/copilot_usage/test_report.py Updates existing assertions and adds a new unit test ensuring the qualifier never appears for pure-active sessions.
tests/e2e/test_e2e.py Updates the string marker used to split historical vs active output in interactive e2e tests.

@microsasa microsasa added the aw-ci-fix-attempted CI fixer has attempted to fix CI label Apr 24, 2026
The Table() constructor call was left in multi-line format after
shortening the title string. With the shorter title, the call fits
on a single line (66 chars < 88 line limit), so ruff format requires
it to be collapsed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 8b57f52

Generated by CI Fixer

@microsasa
Copy link
Copy Markdown
Owner Author

CI Fix Applied 🔧

The check job failed due to a ruff format violation in src/copilot_usage/report.py.

Root cause: The Table() constructor was left in multi-line format after shortening the title from "🟢 Active Sessions (Since Last Shutdown)" to "🟢 Active Sessions". The shorter string makes the call fit on a single line (66 chars < 88 line limit), so ruff format requires it to be collapsed.

Fix: Collapsed the Table() call to a single line.

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pypi.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pypi.org"

See Network Configuration for more information.

Generated by CI Fixer · ● 5.4M ·

@microsasa
Copy link
Copy Markdown
Owner Author

CI fix already attempted once — stopping to prevent loops. Manual intervention needed.

Generated by CI Fixer · ● 483.5K ·

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment on lines +557 to 560
table = Table(title="🟢 Active Sessions", border_style="green")
table.add_column("Name", style="bold", max_width=40)
table.add_column("Model")
table.add_column("Model Calls", justify="right")
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

The render_full_summary docstring still says “Section 2: Active sessions since last shutdown.” (see report.py around lines 593–596), but the section title is now unqualified and the active stats can represent full-lifetime data for pure-active sessions. Please update the docstring to match the new behavior to avoid misleading future maintainers.

Copilot uses AI. Check for mistakes.
@microsasa microsasa added the aw-review-response-1 Review response round 1 label Apr 24, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 70fb682

Generated by Review Responder

@microsasa microsasa added aw-review-response-2 Review response round 2 aw-review-response-3 Review response round 3 aw-review-response-4 Responder dispatch round 4 (orchestrator-managed) aw-review-response-5 Responder dispatch round 5 (orchestrator-managed) aw-pr-stuck:review labels Apr 24, 2026
@microsasa
Copy link
Copy Markdown
Owner Author

❌ Pipeline orchestrator: review-response loop reached 5 rounds. Marking as stuck for human review.

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

Labels

aw Created by agentic workflow aw-ci-fix-attempted CI fixer has attempted to fix CI aw-pr-stuck:review aw-review-response-1 Review response round 1 aw-review-response-2 Review response round 2 aw-review-response-3 Review response round 3 aw-review-response-4 Responder dispatch round 4 (orchestrator-managed) aw-review-response-5 Responder dispatch round 5 (orchestrator-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw][code health] _render_active_section_from table title "Since Last Shutdown" is misleading for pure-active sessions

2 participants