Skip to content

chore: remove legacy per-entity reorder endpoints and SortableTileGrid fallback - #1000

Open
devin-ai-integration[bot] wants to merge 3 commits into
devin/1785282182-manage-categories-orderingfrom
devin/1785285727-remove-legacy-reorder
Open

chore: remove legacy per-entity reorder endpoints and SortableTileGrid fallback#1000
devin-ai-integration[bot] wants to merge 3 commits into
devin/1785282182-manage-categories-orderingfrom
devin/1785285727-remove-legacy-reorder

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Closes #998 (final cleanup sub-issue of epic #975). With Browse (#995#997) and Manage Categories (#999) both persisting ordering through the shared coordinator and PUT /api/tile-order, the deprecated dual-write ordering path is deleted:

  • Backend: PUT /api/categories/reorder and PUT /api/images/reorder routes removed, along with CategoryReorderRequest/ImageReorderRequest schemas and their per-endpoint telemetry glue. PUT /api/tile-order (single transaction, set-based, CAS-revisioned) is now the only ordering write path.
  • Frontend: reorderCategories/reorderImages wrappers removed from api.ts; the non-coordinator fallback persistence path in SortableTileGrid is gone and the tileOrdering prop is now required — every accepted drop is reportOrder-ed to the coordinator, which owns queueing/coalescing/conflicts:
- tileOrdering?: { displayOrder, reportOrder, claimGeneration }
+ tileOrdering: { displayOrder, reportOrder, claimGeneration }
  • Tests: legacy-path suites migrated to the coordinator-only contract (SortableTileGrid.test.tsx, SortableTileGridReorderRegression.test.tsx, backend router/telemetry/fixture tests); the obsolete SortableTileGridReorderTelemetry.test.tsx (legacy grid-owned lifecycle telemetry) is deleted — coordinator telemetry is covered in tileOrdering.test.ts.
  • Docs: tile-ordering.md, reorder-telemetry.md, and drag-and-drop.md updated; move-vs-reorder dispatch contract unchanged.

The ignored/abandoned lifecycle states remain in the telemetry vocabulary (historical dashboards) but are no longer emitted.

Validation: backend poetry run pytest (959 passed), frontend npm test (1372 passed), build, format:check, lint (only the pre-existing CanvasOverlay.tsx react-refresh error).

Link to Devin session: https://app.devin.ai/sessions/414754bd88374dc693f47100ac269e78

…d fallback

Removes PUT /api/categories/reorder and PUT /api/images/reorder, their
request schemas, the reorderCategories/reorderImages API wrappers, and
the non-coordinator fallback persistence path in SortableTileGrid (the
tileOrdering prop is now required). PUT /api/tile-order via the shared
coordinator is the sole ordering write path. Migrates tests to the
coordinator-only contract and updates the ordering/telemetry docs.

Closes #998. Part of epic #975.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from kphunter as a code owner July 29, 2026 00:59
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

Open in Devin Review

Comment thread backend/app/routers/categories.py
Comment thread backend/tests/test_reorder_fixture.py
Comment thread frontend/src/components/SortableTileGrid.tsx
…y reorder code

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

Open in Devin Review

Comment thread backend/app/routers/categories.py
Comment thread frontend/src/components/SortableTileGrid.tsx
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread frontend/src/components/SortableTileGrid.tsx
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.

0 participants