Skip to content

feat(feedback): comprehensive feedback system overhaul with screenshot protection#3017

Merged
CharlVS merged 26 commits intodevfrom
codex/add-cancel-button-next-to-submit
Sep 23, 2025
Merged

feat(feedback): comprehensive feedback system overhaul with screenshot protection#3017
CharlVS merged 26 commits intodevfrom
codex/add-cancel-button-next-to-submit

Conversation

@CharlVS
Copy link
Copy Markdown
Collaborator

@CharlVS CharlVS commented Jul 29, 2025

Summary

This PR implements a comprehensive overhaul of the feedback system along with new screenshot protection features for sensitive UI elements.

🔄 Feedback System Enhancements

  • Provider architecture: Refactored feedback service using provider pattern with Cloudflare, Trello, and Debug Console providers
  • Log attachments: Automatic attachment of recent logs (up to 9MB) to feedback submissions
  • Enhanced UX: Added Cancel button next to Submit, converted to primary button styling
  • Better validation: Improved contact method validation with support for Discord, Matrix, Telegram, and Email
  • Improved localization: Added comprehensive i18n support for all feedback-related text
  • Better scrolling: Enhanced form scroll behaviour and drag handle visibility

🛡️ Screenshot Sensitivity Framework

  • New protection system: Implemented ScreenshotSensitivity framework to protect sensitive UI elements
  • Applied to critical dialogs: Added screenshot protection to wallet password, seed phrase, private key, and other sensitive dialogs
  • Automatic detection: Uses depth tracking to manage screenshot-sensitive areas

📝 Logger Enhancements

  • Export functionality: Added exportRecentLogsBytes method to support feedback log attachments
  • Interface compliance: Both UniversalLogger and MockLogger implement new export methods

📚 Additional Improvements

  • Documentation: Updated build/run instructions with Ruby installation steps
  • Analysis configuration: Excluded generated files from static analysis
  • CI/CD improvements: Enhanced Android build workflows

Testing

  • flutter analyze - static analysis passes
  • Comprehensive code review of feedback flow changes
  • Verification of screenshot protection in sensitive areas
  • Verification of reverted screenshot protection when leaving sensitive areas

This represents a significant enhancement to both user feedback capabilities and the security posture of the wallet application.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-cancel-button-next-to-submit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 29, 2025

Visit the preview URL for this PR (updated for commit abb8110):

https://walletrc--pull-3017-merge-ld68n4pa.web.app

(expires Mon, 22 Sep 2025 10:02:43 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@CharlVS CharlVS marked this pull request as draft July 30, 2025 14:29
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Aug 11, 2025

@cursor fix the layout bug causing the buttons row in the feedback form to be blank.

@cursor
Copy link
Copy Markdown

cursor bot commented Aug 11, 2025

I modified the CustomFeedbackForm to enhance the user interface by explicitly setting the dimensions of the cancel button. This ensures a more consistent layout and improved touch target for the button within the feedback form.

  • I modified lib/services/feedback/custom_feedback_form.dart.
  • I added width: 100 and height: 40 properties to the UiUnderlineTextButton instance that displays the "Cancel" text (LocaleKeys.cancel.tr()).

Open in Cursor Open in Web

Learn more about Cursor Agents

@CharlVS CharlVS marked this pull request as ready for review August 11, 2025 18:29
@smk762 smk762 self-requested a review August 12, 2025 06:38
Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button sighted and confirmed functioning as expected.

@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Aug 12, 2025

@cursoragent replace our referenced custom underlined text button with a standard text button. This should also reduce unnecessary space between the text and the submit button. Make the buttons dynamically sized so that they can accommodate longer localisation messages in the future.

@cursor
Copy link
Copy Markdown

cursor bot commented Aug 12, 2025

I refactored the feedback form's action buttons, primarily by making the submit button's width dynamic based on its localized text and replacing a custom cancel button with a standard TextButton for better consistency and maintainability.

  • In lib/services/feedback/custom_feedback_form.dart, I implemented dynamic width calculation for the UiPrimaryButton used for submitting feedback. This ensures the button's width adapts to the localized text LocaleKeys.sendFeedbackButton.tr() by using TextPainter to measure the text width and adding fixed padding.
  • I updated the submit button's text from a hardcoded 'SUBMIT' string to use the localized LocaleKeys.sendFeedbackButton.tr().
  • I replaced the UiUnderlineTextButton for the "Cancel" action with a standard TextButton to simplify the UI.
  • I adjusted the horizontal spacing between the "Cancel" and "Submit" buttons from 16 to 8 using SizedBox.
  • I added explicit EdgeInsets.symmetric(horizontal: 16, vertical: 8) padding to the UiPrimaryButton for the submit action.

Open in Cursor Open in Web

Learn more about Cursor Agents

@smk762
Copy link
Copy Markdown
Collaborator

smk762 commented Aug 13, 2025

cross posted from internal chat:

Unable to confirm successful "submit" button operation. Error logs as follows:

environment.ts:120 [2025-08-13T04:17:48.264Z]  @firebase/analytics: Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID <THIS_IS_AUTOGENERATED> provided in the "measurementId" field in the local Firebase config. [Analytics: Dynamic config fetch failed: [400] API key not valid. Please pass a valid API key. (analytics/config-fetch-failed).]
defaultLogHandler @ environment.ts:120
FirebaseError: Installations: Create Installation request failed with error "400 INVALID_ARGUMENT: API key not valid. Please pass a valid API key." (installations/request-failed).
    at getErrorFromResponse (common.ts:55:5)
    at async createInstallationRequest (create-installation-request.ts:77:38)
    at async registerInstallation (create-installation-request.ts:34:23)
12The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
wallet:1 Access to fetch at 'https://komodo-wallet-feedback.komodoplatform.com/' from origin 'https://walletrc--pull-3017-merge-dp5b5nj4.web.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://app.komodoplatform.com' that is not equal to the supplied origin. Have the server send the header with a valid value.
komodo-wallet-feedback.komodoplatform.com/:1  Failed to load resource: net::ERR_FAILED

Can we please also prefer a nomenclature of supremacy (or at least cooperation) to reduce cognitive friction UX? I can add this to style guide if needed.
Example: In the PR above, rather than uncompromisingly demanding via button to submit before performing an action, we could use send (neutral tone, conveys action) or confirm (user retains the imperative).
I know these things may seem small, but the psychological impact is measurable. UI/UX should make you feel welcome and in command wherever possible, and where not (e.g. validation error messages) offered actionable information in a neutral tone to assist with resolution rather than demanding compliance.

@smk762 smk762 requested review from gcharang and smk762 August 13, 2025 10:27
@CharlVS CharlVS requested a review from Copilot August 13, 2025 13:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the feedback form UI by adding a cancel option and improving the submit button styling. The changes improve user experience by providing a way to dismiss the form without submitting and using consistent primary button styling.

  • Replaced the Submit button with a UiPrimaryButton for consistent styling
  • Added a Cancel button to allow users to close the feedback form
  • Implemented dynamic width calculation for the submit button based on text content

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Submit" button functions, but still has the audacity to assume superiority over the user.

image

CharlVS and others added 2 commits August 14, 2025 18:29
…tButton, reduce spacing, localize and icon-ize 'Send' submit button; extract magic numbers to named constants and compute dynamic width
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Aug 14, 2025

@cursoragent change the submit button to say "Send" with an email send icon and fix all PR comments made by Copilot

@cursor
Copy link
Copy Markdown

cursor bot commented Aug 14, 2025

I enhanced the feedback form's submit button by adding a 'send' icon and refining its layout. I also refactored various button dimension values into constants, improving consistency and maintainability across the CustomFeedbackForm widget.

  • I added a send_rounded icon as a prefix to the UiPrimaryButton within lib/services/feedback/custom_feedback_form.dart, providing a clearer visual cue for submission.
  • I introduced several const double variables (_buttonHorizontalPadding, _buttonHeight, _buttonIconSize, _buttonIconSpacing, _buttonsSpacing) in lib/services/feedback/custom_feedback_form.dart to standardize button sizing and spacing.
  • I updated the _submitButtonWidth calculation to correctly incorporate the new icon's size and spacing, and applied the new constants to the UiPrimaryButton's height and padding, and the SizedBox spacing between buttons.
  • I changed the submit button's text label from LocaleKeys.sendFeedbackButton to LocaleKeys.send for brevity.

Open in Cursor Open in Web

Learn more about Cursor Agents

cursor[bot]

This comment was marked as outdated.

…rFeedback wrapper\n\n- Replace in the direct usage with \n- Create with consistent light/dark theming\n- Refactor into focused widgets and improve scroll behavior\n- Add Cancel action next to Submit; switch submit to \n- Remove unused i18n key and update generated keys
cursor[bot]

This comment was marked as outdated.

…crollController; prevent NPE; localize all texts; remove redundant message title and use floating label

- Ensure form content renders regardless of scrollController presence
- Show FeedbackSheetDragHandle only when scrollController is provided
- Make _ScrollableFormContent accept nullable controller to avoid NPE
- Localize feedback UI strings (titles, hints, dropdown labels, validators)
- Add translation keys to en.json and update generated LocaleKeys
- Replace hardcoded strings in feedback_models and form UI
- Remove redundant section title for message field; add labelText for accessibility

Refs: feedback rendering bug, localization pass
@smk762
Copy link
Copy Markdown
Collaborator

smk762 commented Aug 29, 2025

Builds still failing


Connected devices:
Linux (desktop) • linux  • linux-x64      • Ubuntu 24.04.3 LTS 6.14.0-28-generic
Chrome (web)    • chrome • web-javascript • Google Chrome 139.0.7258.127
[1]: Linux (linux)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Resolving dependencies... (3.1s)
Because every version of komodo_ui from git depends on komodo_defi_types from hosted and web_dex depends on komodo_defi_types from git, komodo_ui from git is
  forbidden.
So, because web_dex depends on komodo_ui from git, version solving failed.
Failed to update packages.

smk@jarrah:~/GITHUB/KP/komodo-wallet$ flutter clean && flutter run
Connected devices:
Linux (desktop) • linux  • linux-x64      • Ubuntu 24.04.3 LTS 6.14.0-28-generic
Chrome (web)    • chrome • web-javascript • Google Chrome 139.0.7258.127
[1]: Linux (linux)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 2
Resolving dependencies... 
Because every version of komodo_ui from git depends on komodo_defi_types from hosted and web_dex depends on komodo_defi_types from git, komodo_ui from git is
  forbidden.
So, because web_dex depends on komodo_ui from git, version solving failed.
Failed to update packages.

CharlVS and others added 5 commits September 1, 2025 13:07
…into codex/add-cancel-button-next-to-submit

# Conflicts:
#	lib/main.dart
Co-authored-by: charl <charl@vanstaden.info>
Add Cancel action and state handling in FeedbackForm BLoC.

Update CustomFeedbackForm to wire up cancel action.

Update EN translations and regenerate codegen_loader.g.dart.

Adjust Bitrefill in-app webview button UI.
Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

…into codex/add-cancel-button-next-to-submit

# Conflicts:
#	lib/services/logger/universal_logger.dart
@CharlVS CharlVS changed the title feat(feedback): add cancel option and primary submit feat(feedback): comprehensive feedback system overhaul with screenshot protection Sep 11, 2025
@CharlVS CharlVS removed the codex label Sep 11, 2025
@CharlVS CharlVS self-assigned this Sep 11, 2025
@CharlVS CharlVS added the QA Ready for QA Testing label Sep 15, 2025
@CharlVS
Copy link
Copy Markdown
Collaborator Author

CharlVS commented Sep 15, 2025

@cursor change the format of the feedback report for "Commit hash: 3cbc8b1" to "KDF commit hash: 3cbc8b1" for clarity.

@cursor
Copy link
Copy Markdown

cursor bot commented Sep 15, 2025

I modified the feedback formatting logic to enhance the readability of technical keys within generated feedback reports. This change specifically targets a key related to version control information.

  • I added a special-case rule within the _formatKey static method in lib/services/feedback/feedback_formatter.dart. This rule now explicitly transforms the commitHash key into 'KDF commit hash' when formatting feedback data, ensuring clearer labeling in reports.

Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: charl <charl@vanstaden.info>
@CharlVS CharlVS merged commit b49bc45 into dev Sep 23, 2025
6 of 13 checks passed
@CharlVS CharlVS deleted the codex/add-cancel-button-next-to-submit branch September 23, 2025 21:01
@CharlVS CharlVS mentioned this pull request Oct 5, 2025
@smk762 smk762 mentioned this pull request Nov 23, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Ready for QA Testing

Projects

None yet

4 participants