Repository navigation
fix: render the Board view whenever its database opens - #667
Merged
Merged
Conversation
Add a Playwright BDD feature covering three ways the Board view of a database could stay empty while its Grid view worked: - a row_orders entry whose DatabaseRow data never loads kept the Board on its loading skeleton forever - a Board without persisted grouping and without a Select or Checkbox property rendered nothing at all - a Board grouped by a property type the web Board cannot draw (for example a Date grouping copied from the Grid) showed a dead-end message The scenarios fail on main and run in the database-bdd CI group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A database that opened in its Grid view could leave its Board view loading forever, blank, or stuck on a dead-end message. - Missing rows no longer block the Board. Grouped views waited for every row in row_orders to load. The background row loader now settles a row that is still missing after its first retry (or that cannot be retried), so the Board renders with the rows it has and adds late rows when they arrive. The loader also follows the same inline-view tombstones as the rendered row list, so a row the Board shows is always loaded. - A Board with nothing to group by is grouped by a new "Status" Single select property for editors, matching Desktop and the server recipe. Readers see the "No group by property" state instead of a blank view. - A Board grouped by a type the web Board cannot draw yet (Date, URL, Number, Text, Person, Relation, Created/Last edited by) names that property and offers a Group by menu to switch to a Select or Checkbox property, or to create a Status property. useGroupsSelector now derives its ids while rendering, so a Board never reports itself as ungrouped for one render after its grouping is written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideThe PR makes Board opening resilient by settling rows that cannot hydrate, using the same visible row set as rendering, synchronously resolving grouping state, and providing automatic or actionable grouping recovery for ungrouped and unsupported Boards; comprehensive Jest and BDD regressions are added and wired into CI. Sequence diagram for resilient Board openingsequenceDiagram
participant Board
participant Loader as BackgroundRowDocLoader
participant RowSync as RowDataSource
participant Grouping as GroupingSelector
Board->>Loader: useBackgroundRowDocLoader
Loader->>Loader: materializeVisibleRowOrders
Loader->>RowSync: ensureRow(rowId)
alt row data loads
RowSync-->>Loader: row data
Loader-->>Grouping: cached row document
else row remains missing after retry
Loader->>Loader: markRowUnavailable(rowId)
Loader-->>Grouping: unavailableRowIds
end
Grouping->>Grouping: areGroupRowsHydrated(rows, rowMetas, unavailableRowIds)
Grouping-->>Board: grouping ready
Board-->>Board: render loaded cards and columns
Flow diagram for Board grouping recoveryflowchart TD
A[Board opens] --> B{Grouping available?}
B -->|Select or Checkbox grouping| C[Render Board columns]
B -->|No grouping and editable| D[createBoardGroupingField]
D --> E[Create Status Single select]
E --> F[Persist Board grouping without undo step]
F --> C
B -->|No grouping and read-only| G[Show No group by property]
B -->|Unsupported grouping type| H[Show grouping property name]
H --> I{Editor action}
I -->|Choose supported property| C
I -->|No supported properties| D
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Replay deterministic Yjs defaults for the Status field, view field orders, settings, and grouping so concurrent initialization preserves one shared schema and pre-sync card edits. Keep explicit creation undoable and skip repeated automatic initialization. Validated with 155 focused tests, TypeScript checking, ESLint, and formatting checks.
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.
Description
A database that opens in its Grid view could leave its Board view loading forever, blank, or stuck on a dead-end message. There were three separate causes, each reproduced in the browser against a local Cloud built from
main(0de377aa1):row_ordershas row data (areGroupRowsHydrated). A row order whose DatabaseRow collab is missing on the server never loads. The background loader gave up after its retries, but nothing marked the row as settled, so the Board kept its Kanban skeleton. The Grid rendersrow_ordersdirectly, and its filter/sort path already stops waiting for such rows.is_deletedflags, while the rendered row list uses the inline view's tombstones (materializeVisibleRowOrders). A row the Board waited for could therefore never be loaded. The loader now uses the same visibility as the row list.useGroupsSelectorreturned[], soBoardreturnednull.ensure_board_grouping_field), and so does the server recipe for new Boards. This automatic setup is not recorded as an undo step.useGroupsSelectornow computes the group ids during render.useDatabasealready re-renders on every database change, and the copy previously kept in state made a Board that had just been grouped report itself as ungrouped for one render.BOARD_GROUPABLE_FIELD_TYPESreplaces three copies of the Select/Checkbox type list.Validation
board-always-renders.feature(3 scenarios), in its own first commit:main, all 3 scenarios fail: the skeleton is still showing after 20 s, the Board is blank, and the old message has neither the property name nor an action.--repeat-each=2run.database-bddCI group.board-always-renders.test.tsx(6 tests) andBoardNoGroup.test.tsx(3 tests). 4 of the 5 hook and Board tests that apply tomainfail there. The fifth guards against the one-render "ungrouped" flash.tsc --project tsconfig.web.jsonand ESLint on the changed files are clean.board-group-visibilityscenarios 1–3,board-grouping-default,list-group-visibility(6 of 7 scenarios; scenario 4 is listed below),number-groupingandview-tab-order.board-edit-operations,board-scroll-stability,database-view-consistency,database-grid-grouping, the Board cases ofatomic-database-layoutsandatomic-database-view, and the embedded bottom-scroll spec.mainand not fixed here:board-hidden-empty-groups.feature(4 scenarios),board-group-visibility.featurescenario 4 andlist-group-visibility.featurescenario 4. These assert old Group menu toggle behaviour and are not in the CI matrix.EXPERIMENTAL_DATABASE_VIEW_CREATION_ENABLED.ensureRow, so they still exercise the "still hydrating" state.Checklist
🤖 Generated with Claude Code
Summary by Sourcery
Ensure every database Board reaches a usable rendered or actionable state when its database opens.
New Features:
Bug Fixes:
Enhancements:
CI:
Tests: