Skip to content

fix(app): block submitting an unchanged guide revision - #279

Open
douicoder wants to merge 2 commits into
bluelearn-org:mainfrom
douicoder:fix/block-no-change-guide-submit
Open

fix(app): block submitting an unchanged guide revision#279
douicoder wants to merge 2 commits into
bluelearn-org:mainfrom
douicoder:fix/block-no-change-guide-submit

Conversation

@douicoder

@douicoder douicoder commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Prevent submitting a guide (or variant) revision when nothing was changed. The edit flow shared by "Edit Guide" and "Edit Variant" now compares the draft fields against the live revision snapshot it was seeded from before persisting, and shows an error toast when the submission is a no-op.

  • Added isRevisionDraftUnchanged() pure helper in app/src/lib/guideUtils.ts
  • Wired it into publish() in the edit route to block no-op submissions
  • Added unit tests in app/src/lib/__tests__/guideUtils.test.ts

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Build / tooling / CI
  • Other: _________

Verification

  • pnpm -r typecheck passes
  • pnpm -r build passes
  • Manually verified in a browser (for UI / behavior changes)
  • Followed the app layout conventions
  • No new dependencies, or new dependencies are justified and AGPL-compatible
  • Change does not violate any non-negotiable principle
  • Documentation only, no changes to the codebase, so no tests required

Closes #181

Guard the guide and variant edit flows against submitting a revision
that is byte-for-byte identical to the live revision. Compare the draft
fields against the snapshot before persisting, and surface an error toast
when nothing changed.

Closes bluelearn-org#181

Signed-off-by: Doui <doui.gurvinder@outlook.com>
@douicoder douicoder closed this Aug 9, 2026
@douicoder douicoder reopened this Aug 9, 2026
@andyrodrigues30 andyrodrigues30 added the area:frontend Tasks related to frontend (app) label Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Tasks related to frontend (app)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add pagination to list read routes

2 participants