-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/log detail 3 mode toggle #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5332dff
feat: implement persistent tab visibility, add data retention utiliti…
77d6c3c
feat: add dynamic Params tab to network detail panel and reorganize r…
60a08dc
feat: introduce RetentionCapped utility and display "Showing N of M" …
d6294a0
refactor: implement reactive lifetime entry counting across all featu…
e7a572d
refactor: remove unused screenshot generation logic and unnecessary k…
0cc9d16
ci: run build_runner during PR verification workflow steps
1581cdb
ci: add workflow step to block print and debugPrint statements in lib…
a7ae22d
chore: restrict flutter analyze to lib directory in pr-verification w…
dd5d1cf
refactor: standardize memory retention caps and prevent crashes on in…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| import 'package:flutter/material.dart'; | ||
|
|
||
| import '../../core/constants/app_constants.dart'; | ||
| import '../../core/theme/color_tokens.dart'; | ||
|
|
||
| /// Count pill + optional "Showing N of M" hint used by per-feature | ||
| /// toolbars. Mirrors the pattern from the All Events header so the UX | ||
| /// stays consistent across pages. | ||
| /// | ||
| /// - Pill always shows `count` and, when [limit] is set, the cap label | ||
| /// (e.g. `87 / 100`). | ||
| /// - When [total] > [count] (i.e. the source list was longer than the | ||
| /// cap and oldest entries were dropped), a small note `Showing N of M` | ||
| /// is rendered below the pill in muted grey so the user knows older | ||
| /// entries are hidden. | ||
| class RetentionHint extends StatelessWidget { | ||
| /// Visible entry count after capping. | ||
| final int count; | ||
|
|
||
| /// Source list length BEFORE capping. When > [count], a "Showing N | ||
| /// of M" note is rendered. | ||
| final int total; | ||
|
|
||
| /// User-configured retention cap. `null` = no cap; pill shows just | ||
| /// `count` and the note is hidden (nothing is being trimmed). | ||
| final int? limit; | ||
|
|
||
| /// Human label for the cap (e.g. `100`, `1K`, `Unlimited`). | ||
| final String limitLabel; | ||
|
|
||
| const RetentionHint({ | ||
| super.key, | ||
| required this.count, | ||
| required this.total, | ||
| required this.limit, | ||
| required this.limitLabel, | ||
| }); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| final isDark = Theme.of(context).brightness == Brightness.dark; | ||
| final isTrimmed = limit != null && total > count; | ||
|
|
||
| return Column( | ||
| crossAxisAlignment: CrossAxisAlignment.start, | ||
| mainAxisSize: MainAxisSize.min, | ||
| children: [ | ||
| Container( | ||
| padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), | ||
| decoration: BoxDecoration( | ||
| color: ColorTokens.primary.withValues(alpha: 0.12), | ||
| borderRadius: BorderRadius.circular(10), | ||
| ), | ||
| child: Text( | ||
| limit == null ? '$count' : '$count / $limitLabel', | ||
| style: const TextStyle( | ||
| fontSize: 11, | ||
| fontWeight: FontWeight.w700, | ||
| color: ColorTokens.primary, | ||
| ), | ||
| ), | ||
| ), | ||
| if (isTrimmed) ...[ | ||
| const SizedBox(height: 2), | ||
| Text( | ||
| 'Showing $count of $total', | ||
| style: TextStyle( | ||
| fontSize: 9, | ||
| fontFamily: AppConstants.monoFontFamily, | ||
| color: isDark ? Colors.grey[600] : Colors.grey[500], | ||
| ), | ||
| ), | ||
| ], | ||
| ], | ||
| ); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Localize the "Showing N of M" string.
The
Showing $count of $totaltext is user-facing but hardcoded in English. This PR adds localized strings fordataRetention,allEventsDisplay, and other retention-related labels across all supported locales, but this hint text is missed. Non-English users will see an English fragment in an otherwise localized UI.🌐 Proposed fix to localize the hint
Add a new ARB key (e.g.
showingCountOfTotal) with a placeholder:Then use it in the widget:
📝 Committable suggestion
🤖 Prompt for AI Agents