Skip to content

Fix repeat collapsing and harden Flask secret fallback#3

Merged
HugoMSFT merged 1 commit into
mainfrom
hugomsft/app-review
Jun 2, 2026
Merged

Fix repeat collapsing and harden Flask secret fallback#3
HugoMSFT merged 1 commit into
mainfrom
hugomsft/app-review

Conversation

@HugoMSFT

@HugoMSFT HugoMSFT commented Jun 2, 2026

Copy link
Copy Markdown
Owner

This change fixes two behavior issues that directly affect reliability in the app review flow: repeating feedback was not actually being hidden when requested, and the Flask secret fallback used a static development value.

What changed

  • Implemented real repeat collapsing in both feedback paths:
    • /feedback page rendering
    • /api/feedback/filtered API filtering
  • Added a shared helper (collapse_repeating_feedback_items) that keeps one representative item per repeating cluster while preserving unique items.
  • Fixed repeat cluster detection logic to compare by object identity instead of equality, so exact duplicate payloads are clustered correctly.
  • Replaced the hardcoded FLASK_SECRET_KEY fallback with a generated secure token (secrets.token_hex(32)).
  • Replaced stray print calls in Fabric state sync logging with structured logger calls.
  • Added regression tests for repeat collapsing behavior in tests/test_utils_repeating.py.

Validation

  • python -m unittest discover -s tests
  • python -m compileall src tests

Notes for reviewers

The repeat-collapsing behavior now runs before sorting in both server-rendered and API-filtered flows, so the Hide/Analyze toggle behaves consistently across the UI.

Implement real repeat-collapsing behavior in feedback viewer and filtered API paths, fix identity handling in repeating analysis for exact duplicates, replace static FLASK secret fallback with generated token, and add regression tests for repeat collapsing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@HugoMSFT
HugoMSFT merged commit 630038d into main Jun 2, 2026
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.

1 participant