perf(requests): index the request list in paging order (#61) - #62
Merged
Merged
Conversation
… test-first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
Migration 0017 replaces requests_company_id_idx with (company_id, created_at desc, id desc); its leading column still serves lookups by company. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
…f table statistics (#61 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
Fluory
changed the base branch from
claude/chore-correction-index-check-47
to
main
September 24, 2026 16:51
Owner
Author
Frischer Review (read-only Subagent) – Ergebnis und UmgangNichts blockierend. Bestätigt: Indexrichtung passt zu
Generated by Claude Code |
15 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warum
Fixes #61 · Vorschlag aus dem Review von #58, vom Orchestrator am 2026-09-24 freigegeben („Bau den Vorschlag ein“).
Arbeitsstand
data-model.md, CHANGELOG, frischer Review eingearbeitet,main(inkl. fix(db): refuse a negative item index on field corrections (#47) #57, feat(requests): keyset pagination for the request list (#48) #58) eingemergt,verifygrün.Was ist passiert (Klartext)
Die Anfragenliste (seit #58 seitenweise) holt jetzt jede Seite direkt aus einem passend sortierten Verzeichnis der Datenbank, statt jedes Mal alle Anfragen der Firma zu sortieren. Für Nutzer ändert sich nichts außer der Geschwindigkeit bei vielen Anfragen.
Plan-Pflicht (SYSTEM.md §4)
Impact Manifest
db(Schema, Migration),requests(Nutzer des Index).0017_request_list_index.sql: ersetztrequests_company_id_idxdurchrequests_company_created_idx (company_id, created_at DESC, id DESC)– die führende Spalte bedient weiterhin alle Zugriffe nur nachcompany_id.tests/integration/indexes.test.ts: Katalog prüft Spalten und Richtung;EXPLAINfür die erste Seite und für die Blätter-Bedingung(created_at, id) < (…)– Index-Bedingung, keinSort(robust gegen Tabellengröße)..desc()standardmäßigNULLS LAST, die Listenabfrage sortiert mitDESC(=NULLS FIRST) – mitNULLS LASThätte der Index die Sortierung nicht liefern können (Mutationsprobe:Sorterscheint); daher.nullsFirst().CREATE INDEXsperrt Schreibzugriffe aufrequestskurz (Pilot: kleine Tabelle). Rollback: Index tauschen.Geändert
src/db/schema/app.ts,src/db/migrations/0017_request_list_index.sql,meta/(generiert)tests/integration/indexes.test.tsdocs/technical/data-model.md,CHANGELOG.mdNachweis (SYSTEM.md §11)
verify:changed: grün –indexes2/2 (vorher 2 rot)verify: grün nach Merge vonmain– unit 169, integration 126verify:full/ E2E-Spec: nicht betroffenNULLS LAST-Index → Plan mitSortDoku-Entscheidung (genau eine)
docs/technical/data-model.md[Unreleased](sichtbares Feature oder Verhalten – im selben PR, nie „später")Entferntes oder Umbenanntes: Index
requests_company_id_idx→requests_company_created_idx;docs/gegrept: keine ErwähnungDateigrößen und neue Bausteine (SYSTEM.md §7)
Dateien über 500 Zeilen im Diff (Ausnahmen: generierter Code, Lockfiles, Fixtures, Migrationen, Schemas, Ressourcen, Doku, Konfiguration):
Über 800 Zeilen mit neuer Fachlogik oder über 1000 Zeilen (P1/P2): nicht betroffen
Neue Shared-Komponente, Utility-Datei, Adapter oder fachlicher Service:
Subagent-Einsätze
Risiken / offene Punkte
🤖 Generated with Claude Code
https://claude.ai/code/session_01DJ5vaKvTYiMvdngT4d3xo1