-
Notifications
You must be signed in to change notification settings - Fork 0
feat: oracle tab pagination + sortable columns #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6741b42
feat: oracle tab pagination + sortable columns
gisk0 24d4718
fix: oracle tab review findings — server sort, global search, chart i…
gisk0 1e254ee
fix: oracle tab sonnet review findings
gisk0 7795e15
fix: address Cursor review findings
gisk0 5ab6632
feat: oracle table UX improvements
gisk0 11e05e1
fix: remove txHash from oracle queries — not in OracleSnapshot schema
gisk0 df26c1a
feat: add txHash to OracleSnapshot — indexer + UI
gisk0 b922521
test: cover oracle pagination queries and aria-sort
gisk0 2c14db6
test: cover txHash persistence on oracle snapshots
gisk0 75f06af
fix: bound oracle search and cover pagination fallback
gisk0 8b1f2ee
docs: add stateful data PR operating rule and checklist
gisk0 d6bce4a
fix: address Cursor review 4044909064
gisk0 4e9eb57
fix: force timestamp desc order for oracle search queries
gisk0 33f2503
fix: address Cursor review 4045194854 — page clamp + sort during search
gisk0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,205 @@ | ||
| # Stateful Data + UI PR Checklist | ||
|
|
||
| Use this checklist for any PR that changes stateful data flow across layers. | ||
|
|
||
| ## Operating rule | ||
|
|
||
| > **Any PR that adds or changes stateful data flow across layers must ship with explicit invariants, degraded-mode behavior, and interaction tests before opening.** | ||
|
|
||
| If the change touches any combination of: | ||
|
|
||
| - Envio schema/entities | ||
| - event handlers / entity writers | ||
| - generated types / GraphQL queries / dashboard types | ||
| - paginated, sortable, filterable, or searchable UI state | ||
| - partial failure behavior (count query failure, stale RPC, missing metadata, old rows after schema rollout) | ||
|
|
||
| then this checklist is mandatory. | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Define invariants first | ||
|
|
||
| Write down the rules the system must obey before coding. | ||
|
|
||
| Examples: | ||
|
|
||
| - Every event/snapshot entity must persist `txHash` | ||
| - Charts must not depend on paginated table slices | ||
| - Paginated tables must have deterministic ordering | ||
| - Aggregate-query failure must degrade visibly, not silently | ||
| - Client-side search over large datasets must be bounded and disclosed | ||
|
|
||
| If you cannot state the invariant in one sentence, the design is not ready. | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Cross-layer audit | ||
|
|
||
| For every new field / changed field / changed behavior, walk the full path: | ||
|
|
||
| ### Schema / source of truth | ||
|
|
||
| - [ ] `schema.graphql` updated if entity shape changed | ||
| - [ ] field names/types/nullability are intentional | ||
| - [ ] backward-compatibility / rollout behavior considered for old rows | ||
|
|
||
| ### Writers | ||
|
|
||
| - [ ] every entity constructor / writer is updated consistently | ||
| - [ ] all event handlers that produce the entity were checked, not just the obvious one | ||
| - [ ] generated/codegen artifacts refreshed where applicable | ||
|
|
||
| ### Readers | ||
|
|
||
| - [ ] GraphQL queries updated | ||
| - [ ] dashboard/runtime types updated | ||
| - [ ] derived formatting / rendering logic updated | ||
| - [ ] search/sort/filter fields updated intentionally | ||
|
|
||
| ### Tests | ||
|
|
||
| - [ ] producer/indexer tests updated | ||
| - [ ] consumer/UI tests updated | ||
| - [ ] fixtures reflect the new schema reality | ||
|
|
||
| If one layer is missing, stop and fix it before opening the PR. | ||
|
|
||
| --- | ||
|
|
||
| ## 3. Stateful table rubric | ||
|
|
||
| If the PR touches a table with pagination, sort, filter, search, or linked charts, answer all of these explicitly. | ||
|
|
||
| ### Sorting | ||
|
|
||
| - [ ] Is sorting server-side, client-side, or hybrid? | ||
| - [ ] Are page boundaries deterministic for non-unique sort fields? | ||
| - [ ] Is there a unique tiebreaker (`id`, tx hash, composite key, etc.)? | ||
| - [ ] Do headers expose sort state accessibly (`aria-sort`)? | ||
|
|
||
| ### Pagination | ||
|
|
||
| - [ ] What determines total row count? | ||
| - [ ] What happens when count/aggregate fails? | ||
| - [ ] Does pagination remain usable after transient failure? | ||
| - [ ] Are controls actual buttons with `type="button"`? | ||
|
|
||
| ### Search / filtering | ||
|
|
||
| - [ ] Does search operate on current page, fetched window, or full dataset? | ||
| - [ ] Is that behavior documented in code comments and PR notes? | ||
| - [ ] If bounded, is the cap explicit and user-visible? | ||
| - [ ] If unbounded, can the backend/query path actually support it? | ||
|
|
||
| ### Coupled visualizations | ||
|
|
||
| - [ ] Do charts use dedicated queries instead of inheriting paginated/sorted table state? | ||
| - [ ] If not, is that coupling intentional and documented? | ||
|
|
||
| ### URL / local state | ||
|
|
||
| - [ ] Is table state URL-backed or intentionally local? | ||
| - [ ] If local-only, is that explicitly called out as an intentional scope decision? | ||
|
|
||
| --- | ||
|
|
||
| ## 4. Degraded-mode checklist | ||
|
|
||
| For each non-happy path, decide the behavior explicitly. | ||
|
|
||
| - [ ] count query fails | ||
| - [ ] chart query fails | ||
| - [ ] some rows predate a new schema field | ||
| - [ ] RPC-derived metadata is missing | ||
| - [ ] total dataset is much larger than the current happy-path sample | ||
| - [ ] search term matches data outside the currently fetched window | ||
| - [ ] empty state vs loading state vs partial-data state are distinct | ||
|
|
||
| The key question: | ||
|
|
||
| > What will the user see, and will they understand that the data is partial or degraded? | ||
|
|
||
| Silent degradation is not acceptable. | ||
|
|
||
| --- | ||
|
|
||
| ## 5. Required test matrix | ||
|
|
||
| For nontrivial stateful data/UI changes, tests must cover all 3 buckets: | ||
|
|
||
| ### Happy path | ||
|
|
||
| - [ ] normal render / query wiring | ||
| - [ ] new field is displayed/used correctly | ||
|
|
||
| ### State transition | ||
|
|
||
| - [ ] sort toggle changes query/order state | ||
| - [ ] page transition changes offset/page state | ||
| - [ ] search input resets/updates the right state | ||
| - [ ] links/actions resolve to the expected target | ||
|
|
||
| ### Failure / degraded mode | ||
|
|
||
| - [ ] count error fallback | ||
| - [ ] capped search behavior | ||
| - [ ] missing field / legacy row behavior | ||
| - [ ] user-visible warning or fallback state | ||
|
|
||
| If the risky behavior is interactive, a static markup assertion is not enough. | ||
|
|
||
| --- | ||
|
|
||
| ## 6. PR description requirements | ||
|
|
||
| Before opening the PR, include these sections: | ||
|
|
||
| ### What this PR changes | ||
|
|
||
| Short factual summary. | ||
|
|
||
| ### Invariants | ||
|
|
||
| List the system rules this PR relies on or introduces. | ||
|
|
||
| ### Degraded behavior | ||
|
|
||
| What happens on count/query/RPC failure, old rows, large datasets, etc. | ||
|
|
||
| ### Intentional non-goals | ||
|
|
||
| Examples: | ||
|
|
||
| - URL-backed sort/page state deferred | ||
| - full server-side search deferred | ||
| - abstraction cleanup out of scope | ||
|
|
||
| This prevents reviews from repeatedly rediscovering scope boundaries. | ||
|
|
||
| --- | ||
|
|
||
| ## 7. Repo-specific lessons already paid for | ||
|
|
||
| These are not theoretical. | ||
|
|
||
| - New UI fields must not assume schema support without verifying all writers. | ||
| - Shared presentational components should forward DOM props unless intentionally constrained. | ||
| - Count fallback must preserve prior total, not collapse to current page length. | ||
| - Search behavior must be bounded and disclosed when not truly global. | ||
| - Charts and tables should usually be decoupled. | ||
| - Cross-layer features need both indexer and UI regression coverage. | ||
|
|
||
| --- | ||
|
|
||
| ## 8. Final pre-PR questions | ||
|
|
||
| If you answer “no” to any of these, do not open yet. | ||
|
|
||
| - [ ] Could another engineer explain the invariants from the PR description alone? | ||
| - [ ] Would a transient backend failure produce a sensible UI instead of a misleading one? | ||
| - [ ] Are the largest-cardinality paths still bounded? | ||
| - [ ] Do tests prove behavior, not just markup? | ||
| - [ ] Did review stop being the place where design gets finished? | ||
|
|
||
| If not, one more local pass is cheaper than three more review rounds. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
txHashis now required (String!), but this introduces a schema-breaking rollout path unless you guarantee full backfill/reindex before any consumer reads this schema. Please either:txHash.As written, staggered environments can fail hard on oracle reads.