Skip to content

refactor(fleet-data): extract scrape_activity into dedicated module#155

Merged
NagyVikt merged 1 commit into
mainfrom
agent/refactor-scrape-extract
May 16, 2026
Merged

refactor(fleet-data): extract scrape_activity into dedicated module#155
NagyVikt merged 1 commit into
mainfrom
agent/refactor-scrape-extract

Conversation

@NagyVikt
Copy link
Copy Markdown
Contributor

Summary

  • Move scrape_activity() and PaneActivity out of fleet-data/src/fleet.rs into a new fleet-data/src/scrape.rs
  • Split the inlined regex-style passes into named private helpers: extract_runtime, extract_model_label, extract_headline
  • Add 17 unit tests, one per extractor + scrape orchestrator
  • fleet.rs::join() body untouched; only use statement changes

Behavior

Pure mechanical extraction. Identical output for all inputs. The empty-runtime retry guard from the original loop is preserved (extract_runtime returns None for empty spans rather than Some("")).

Test plan

  • cargo check -p fleet-data — clean
  • cargo test -p fleet-data — 60 passed (17 new)
  • cargo check -p fleet-state -p fleet-waves — clean (downstream callers compile)

🤖 Generated with Claude Code

Move PaneActivity + scrape_activity out of fleet.rs into a new
src/scrape.rs and split the inline regex-style passes into focused
helpers (extract_runtime, extract_model_label, extract_headline) so
scrape_activity is a thin orchestrator. Adds unit tests covering each
extractor against realistic scrollback samples plus empty / chrome-only
input. Pure refactor — fleet.rs::join keeps the same call shape via a
use crate::scrape::scrape_activity import.
@NagyVikt NagyVikt merged commit 84c6e17 into main May 16, 2026
2 checks passed
@NagyVikt NagyVikt deleted the agent/refactor-scrape-extract branch May 16, 2026 15:13
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