Skip to content

[Bundle Size] Improve logging, remove verbose cli option#57

Open
rameziophobia wants to merge 2 commits into
mainfrom
claude/add-bundle-size-logging-btfps
Open

[Bundle Size] Improve logging, remove verbose cli option#57
rameziophobia wants to merge 2 commits into
mainfrom
claude/add-bundle-size-logging-btfps

Conversation

@rameziophobia
Copy link
Copy Markdown
Collaborator

@rameziophobia rameziophobia commented Mar 1, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced logging output throughout key operations (branch detection, git operations, S3 interactions, downloads, and uploads) for improved observability.
  • Refactor

    • Removed verbose/quiet CLI options and verbosity configuration settings.
    • Simplified logging behavior with consistent output levels across all commands.

@rameziophobia rameziophobia self-assigned this Mar 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 1, 2026

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 4b713722-0a0f-4408-bac9-22bfe80123ec

📥 Commits

Reviewing files that changed from the base of the PR and between 94641a5 and aab614b.

📒 Files selected for processing (7)
  • packages/shaka-bundle-size/src/BaselineStorage.ts
  • packages/shaka-bundle-size/src/BundleSizeChecker.ts
  • packages/shaka-bundle-size/src/Reporter.ts
  • packages/shaka-bundle-size/src/__tests__/BaselineStorage.test.ts
  • packages/shaka-bundle-size/src/__tests__/Reporter.test.ts
  • packages/shaka-bundle-size/src/cli.ts
  • packages/shaka-bundle-size/src/types.ts
💤 Files with no reviewable changes (1)
  • packages/shaka-bundle-size/src/types.ts

Walkthrough

The changes remove the verbosity/quiet mode system from the Reporter class and refactor logging throughout the codebase. Reporter now always outputs (subject to colors option) without verbosity-based gating. Reporter integration is added to BaselineStorage with optional configuration, and CLI commands are updated to propagate reporter instances. Additional logging is introduced in BundleSizeChecker for operations like stats file reading and baseline comparisons.

Changes

Cohort / File(s) Summary
Logging Infrastructure Refactor
Reporter.ts, types.ts
Removes VerbosityLevel type alias, verbose method from IReporter, and verbosity property from ReporterOptions. Eliminates verbosity-based conditional checks in Reporter's info, success, and header methods. SilentReporter's explicit constructor that used verbosity configuration is removed.
Reporter Integration in Storage
BaselineStorage.ts, BaselineStorage.test.ts
Adds optional reporter field to BaselineStorageConfig and initializes a default Reporter when not provided. Injects logging around main branch detection, git operations, S3 interactions, downloads, and uploads. Tests updated to inject SilentReporter into config.
CLI and Command Refactoring
cli.ts
Updates createReporter signature to accept configPath parameter and log config information. Updates createStorage signature to accept and propagate reporter instance. Removes verbose/quiet CLI options. Refactors command handlers to instantiate and pass reporter to storage creation.
Operational Logging Additions
BundleSizeChecker.ts
Changes missing compressed file log level from verbose to warning. Adds logging for stats file reading, baseline path computation, and size comparison operations in check() and updateBaseline() methods.
Test Suite Updates
Reporter.test.ts
Removes verbosity-based test branches and simplifies test expectations. Eliminates tests for verbose/normal/quiet behaviors and collapses them into generic "outputs message" assertions. Updates Reporter and SilentReporter test suites to reflect simplified non-verbose behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 No more verbosity, just truth so clear,
Reporter speaks, without the noise of fear,
Logging flows through storage, CLI, and more,
Simpler, cleaner, easier to adore!
Quiet modes fade, but silence still has grace,
The codebase gleams with logging in its place. 🌟


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

claude added 2 commits March 11, 2026 12:09
The tool doesn't do enough operations to justify 3 verbosity levels.
All messages now always log so users can understand what's happening.

- Remove VerbosityLevel type and verbose() from IReporter interface
- Remove verbosity field and quiet-mode guards from Reporter
- Remove --verbose/-v and --quiet/-q CLI options
- Always log config file path
- Change verbose() call for missing files to warning()
- Update Reporter tests to remove verbosity-related cases

https://claude.ai/code/session_01JvgQDy5Wy2GS253oj8biRs
BaselineStorage previously did all its work silently. Now it logs:
- Main branch detection
- Git fetch and merge-base results
- S3 bucket/prefix being accessed
- Number of commits being checked and which ones
- Download/upload file counts and destinations
- S3 object deletion during upload

https://claude.ai/code/session_01JvgQDy5Wy2GS253oj8biRs
@rameziophobia rameziophobia force-pushed the claude/add-bundle-size-logging-btfps branch from 3eeb394 to aab614b Compare March 11, 2026 12:12
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.

2 participants