🛡️ Sentinel: Iterative Improvement: ProgressBar Privacy Obfuscation#78
Conversation
🎯 Focus: Security Patch / Iterative Enhancement (Privacy Obfuscation) 💡 Context: Added support for temporarily revealing obfuscated amounts inside standard ProgressBar components when privacy mode (`obscureAmounts`) is active. This ensures sensitive UI values revert to an obfuscated state automatically. 🔧 Fix/Addition: - Refactored `ProgressBar` in `budget/lib/widgets/progressBar.dart` from `StatelessWidget` to `StatefulWidget` to maintain `_isRevealed` state. - Wrapped `Stack` inside `Listener` to detect touch events. - Overrode `progressWidth` dynamic evaluation via `isObscured` (`appStateSettings["obscureAmounts"]`). If obfuscated, set to `0`. - Added a 2-second auto-collapse timeout tied with haptic feedback `HapticFeedback.selectionClick()`. 📈 gemini.md Status: Updated `gemini.md` history tracking the `ProgressBar` iteration, and planned the next feature target to be `AnimatedCircularProgress` in `ObjectivePage`. ✅ Verification: Ran `flutter test`. No regressions introduced. Test suite passes successfully with expected pre-existing errors correctly bypassed. Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
This PR extends the app’s “obscure amounts” privacy mode to standard ProgressBar widgets by allowing temporary reveal-on-touch, then auto-reverting to an obfuscated state.
Changes:
- Refactors
ProgressBarfromStatelessWidgettoStatefulWidgetto maintain a local reveal state and auto-hide timer. - Adds pointer event handling + haptic feedback to support temporary reveal behavior.
- Updates
gemini.mdto record the iteration and note the next planned privacy target.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gemini.md | Adds a changelog entry documenting the ProgressBar privacy obfuscation iteration and the next planned audit target. |
| budget/lib/widgets/progressBar.dart | Implements privacy-mode obfuscation (progress width forced to 0 when obscured) plus temporary reveal via pointer events, timer, and haptics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bool isObscured = appStateSettings["obscureAmounts"] == true && !_isRevealed; | ||
|
|
||
| return LayoutBuilder( | ||
| builder: (_, boxConstraints) { | ||
| double x = boxConstraints.maxWidth; | ||
| double progressWidth = (currentPercent / 100) * x; | ||
| return Stack( | ||
| children: [ | ||
| Container( | ||
| width: x, | ||
| height: height, | ||
| decoration: BoxDecoration( | ||
| color: getColor(context, "lightDarkAccentHeavy"), | ||
| shape: BoxShape.rectangle, | ||
| borderRadius: BorderRadiusDirectional.circular(100), | ||
| double progressWidth = isObscured ? 0 : (widget.currentPercent / 100) * x; | ||
| return Listener( | ||
| onPointerDown: (event) { | ||
| _hideTimer?.cancel(); | ||
| setState(() { | ||
| _isRevealed = true; | ||
| }); | ||
| HapticFeedback.selectionClick(); | ||
| }, | ||
| onPointerUp: (event) => _startHideTimer(), | ||
| onPointerCancel: (event) => _startHideTimer(), |
| shape: BoxShape.rectangle, | ||
| borderRadius: BorderRadiusDirectional.circular(100), | ||
| AnimatedContainer( | ||
| duration: Duration(milliseconds: 100), |
🛡️ Sentinel: Iterative Improvement - ProgressBar Privacy Obfuscation
🎯 Focus: Security Patch / Iterative Enhancement (Privacy Obfuscation)
💡 Context: Added support for temporarily revealing obfuscated amounts inside standard ProgressBar components when privacy mode (
obscureAmounts) is active. This ensures sensitive UI values revert to an obfuscated state automatically.🔧 Fix/Addition:
ProgressBarinbudget/lib/widgets/progressBar.dartfromStatelessWidgettoStatefulWidgetto maintain_isRevealedstate.StackinsideListenerto detect touch events.progressWidthdynamic evaluation viaisObscured(appStateSettings["obscureAmounts"]). If obfuscated, set to0.HapticFeedback.selectionClick().📈 gemini.md Status: Updated
gemini.mdhistory tracking theProgressBariteration, and planned the next feature target to beAnimatedCircularProgressinObjectivePage.✅ Verification: Ran
flutter test. No regressions introduced. Test suite passes successfully with expected pre-existing errors correctly bypassed.PR created automatically by Jules for task 10593790538266877418 started by @manupawickramasinghe