refactor: simplify after a codebase review - #17
Merged
Merged
Conversation
The template already starts with its import: Dart drops the newline after the opening quotes, so trimLeft() changed nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lib/ only read the fields back through the setup getter; RunDiff already holds its setups this way. The manifest JSON is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
_capture looked the package up again for the generated config; the flag now comes from the lookup capture branches on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
label and source repeated their whole string for --enter; the optional part is built as a suffix, as WidgetShot does for its size. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The harness writes the same keys as Shot.toJson, which already uses them; brightness loses its null assertion. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Only generator.dart uses it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Its only caller in lib/ was the getter, as WidgetShot.staticId computes its own; the id format is documented on the getter. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The engine writes a per-run directory and deletes it, not one file; two harness doc lines ran past 80 columns. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simplifications found in a review of lib/, each checked with a second reviewer before applying:
shutter initwrites the shell template without a no-optrimLeft().RunManifestholds its actions, capture, and viewport as oneRunSetup, asRunDiffdoes.FlutterTestEnginelooks up google_fonts once per capture.ShotAction.label/sourcebuild the optional--entertext once.Shot.toJson.widgetHelperis private;shotStaticIdis folded intoCandidate.staticId.No behaviour or output format changes.
🤖 Generated with Claude Code