feat: Quick Search record developer panel provider #41

Merged
KofTwentyTwo merged 3 commits from feature/developer-panel into develop 2026-10-12 20:22:02 +00:00
KofTwentyTwo commented 2026-10-12 15:45:13 +00:00 (Migrated from github.com)

Summary

Adds a Quick Search panel to QQQ's record developer view (/app/{table}/{id}/dev, rendered generically by qqq-frontend-next #61).

  • diagnostics/QuickSearchDeveloperPanelProvider (id quickSearch, title "Quick Search", order 400, icon search) implements DeveloperPanelProviderInterface.
  • metadata/QuickSearchDeveloperPanelsMetaDataProducer (a QBitComponentMetaDataProducer, so the QBit's normal producer scan picks it up) registers it in DeveloperPanelsMetaData (idempotent).

Available when the table is one this QBit indexes and the user may read Quick Search Index (table name from the config, prefix-aware).

Panel content, every part permission-checked:

  • Index (key/values): index row (linked), enabled, status, record count, last basepull, last full reindex, searchable fields, OpenSearch alias, real-time indexing.
  • Latest index run (needs read on Quick Search Index Run): type, status, start/end, processed/indexed/errors, linked.
  • Search document: RecordInspector verdict (CURRENT / STALE / MISSING / NO_RECORD) plus a Field / Database / Index / Match table. Same rule as Inspect Search Document: enableDiagnosticTools and debugPermissionRules. Without them, a text block explains why the comparison is missing.
  • Failed index events for this record (needs read on Quick Search Failed Event), as a table, only when there are any.
  • Actions: Inspect search document / Reindex this record, each only when the process exists and PermissionsHelper.hasProcessPermission allows it.
  • Links: Quick Search Admin app (when the user has app permission) and the index row.
  • Status: Indexed (success), Stale (warning), Not indexed (error), Disabled (warning), OpenSearch unavailable (warning), Enabled (info, when no comparison is shown).
  • If OpenSearch can't be reached, the panel still renders. It shows a WARNING text block in place of the comparison and doesn't fail.

Dependency: draft until QQQ 4.1.0-RC.4 is on Central

The qqq-snapshot profile now imports QQQ 4.1.0-RC.4, which carries the developer panel contract (QRun-IO/qqq#1076). RC.4 isn't on Maven Central yet, so CI fails until it's published. Once it's out, re-run CI and mark the PR ready.

After this change the QBit needs RC.4 or later at runtime, because the producer references DeveloperPanelsMetaData.

Tests

  • QuickSearchDeveloperPanelProviderTest (8 tests, OpenSearch on a closed port, like DiagnosticsOfflineTest) covers:
    • registration, and that registering twice adds the provider only once
    • availability: indexed vs unindexed table, and a user without read permission on the index
    • full panel content with OpenSearch down: a warning, not an exception
    • no comparison and no actions without the debug/admin permissions
    • only the inspect action with debug permission but not admin
    • a faked inspection for CURRENT / STALE / MISSING
    • a disabled table
  • DiagnosticsIntegrationTest (Testcontainers OpenSearch) adds an end-to-end panel check: the current record shows Indexed and every row matches.
  • Locally ./mvnw -o verify -Dqqq.snapshot.version=4.1.0-SNAPSHOT passes: 434 unit tests and 33 integration tests, checkstyle and the JaCoCo gate.

Docs: README section "Record developer panel", CHANGELOG [Unreleased], CLAUDE.md dependency note.

🤖 Generated with Claude Code

## Summary Adds a **Quick Search** panel to QQQ's record developer view (`/app/{table}/{id}/dev`, rendered generically by qqq-frontend-next #61). - `diagnostics/QuickSearchDeveloperPanelProvider` (id `quickSearch`, title "Quick Search", order 400, icon `search`) implements `DeveloperPanelProviderInterface`. - `metadata/QuickSearchDeveloperPanelsMetaDataProducer` (a `QBitComponentMetaDataProducer`, so the QBit's normal producer scan picks it up) registers it in `DeveloperPanelsMetaData` (idempotent). **Available** when the table is one this QBit indexes and the user may read Quick Search Index (table name from the config, prefix-aware). **Panel content**, every part permission-checked: - *Index* (key/values): index row (linked), enabled, status, record count, last basepull, last full reindex, searchable fields, OpenSearch alias, real-time indexing. - *Latest index run* (needs read on Quick Search Index Run): type, status, start/end, processed/indexed/errors, linked. - *Search document*: `RecordInspector` verdict (CURRENT / STALE / MISSING / NO_RECORD) plus a Field / Database / Index / Match table. Same rule as Inspect Search Document: `enableDiagnosticTools` and `debugPermissionRules`. Without them, a text block explains why the comparison is missing. - *Failed index events* for this record (needs read on Quick Search Failed Event), as a table, only when there are any. - *Actions*: Inspect search document / Reindex this record, each only when the process exists and `PermissionsHelper.hasProcessPermission` allows it. - *Links*: Quick Search Admin app (when the user has app permission) and the index row. - Status: Indexed (success), Stale (warning), Not indexed (error), Disabled (warning), OpenSearch unavailable (warning), Enabled (info, when no comparison is shown). - If OpenSearch can't be reached, the panel still renders. It shows a WARNING text block in place of the comparison and doesn't fail. ## Dependency: draft until QQQ 4.1.0-RC.4 is on Central The `qqq-snapshot` profile now imports **QQQ 4.1.0-RC.4**, which carries the developer panel contract (QRun-IO/qqq#1076). RC.4 isn't on Maven Central yet, so **CI fails until it's published**. Once it's out, re-run CI and mark the PR ready. After this change the QBit needs RC.4 or later at runtime, because the producer references `DeveloperPanelsMetaData`. ## Tests - `QuickSearchDeveloperPanelProviderTest` (8 tests, OpenSearch on a closed port, like `DiagnosticsOfflineTest`) covers: - registration, and that registering twice adds the provider only once - availability: indexed vs unindexed table, and a user without read permission on the index - full panel content with OpenSearch down: a warning, not an exception - no comparison and no actions without the debug/admin permissions - only the inspect action with debug permission but not admin - a faked inspection for CURRENT / STALE / MISSING - a disabled table - `DiagnosticsIntegrationTest` (Testcontainers OpenSearch) adds an end-to-end panel check: the current record shows **Indexed** and every row matches. - Locally `./mvnw -o verify -Dqqq.snapshot.version=4.1.0-SNAPSHOT` passes: 434 unit tests and 33 integration tests, checkstyle and the JaCoCo gate. Docs: README section "Record developer panel", CHANGELOG `[Unreleased]`, CLAUDE.md dependency note. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.