Skip to content

feat(feedback): add optional context and opt-in diagnostics - #116

Open
AvianJay wants to merge 1 commit into
mainfrom
feat/optional-feedback-details
Open

AvianJay wants to merge 1 commit into
mainfrom
feat/optional-feedback-details

Conversation

@AvianJay

@AvianJay AvianJay commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Feedback currently accepts only a subject and details, which can leave reports without enough context to investigate. Add an optional section for a category, related route or stop, and contact details, plus an opt-in preview of app version, platform, language and display settings.

All additional fields remain optional. Blank fields are omitted, diagnostics start disabled on every visit, turning the switch off omits diagnostics, and failed submissions retain the form for retry. Includes English and Traditional Chinese labels, API payload validation and a guard against accessing disposed fields when leaving during submission.

Backend support is already on busapiserver/main: YetAnotherBusDeveloper/busapiserver@9d875c1. Deploy that backend before releasing this app. Existing apps can continue sending only title and content; the backend preserves the response format and migrates existing feedback records without losing data.

Validation:

  • flutter test test/feedback_service_test.dart test/feedback_screen_test.dart — 11 tests pass.
  • Targeted flutter analyze for the feedback models, service, screen and tests — no issues.
  • Backend: 41 feedback, rate-limit, authentication and admin tests pass, including a real bearer-authenticated legacy HTTP request after database migration, unchanged success response, 401 and 429 behavior.

@Av1anJay Av1anJay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the complete diff, surrounding feedback flow, and the backend payload contract. No actionable blocking issues found. The new optional fields are omitted when blank, and diagnostics require an explicit opt-in.

Checks: GitHub Actions Verify passed for this head: flutter analyze, flutter test, the Chrome route geometry test, and the Node runtime test. Platform builds were still running at review time. Locally, Flutter tests/analyze could not run because Flutter is not installed; the Node test was blocked by this host’s older Node 22.23.1.

This branch has not been deployed

No deployments
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