Skip to content

Conversation

@Spoffy
Copy link
Contributor

@Spoffy Spoffy commented Oct 21, 2025

Context

When a record card is opened for a row that is unavailable (blocked by access control), currently it shows a "random" record.

This occurs because Cursor refuses to be set to non-existent row ids, and instead maintains the current rowIndex. This is usually the last one viewed, or rowIndex 0.

Proposed solution

This solution is option 2 of 2.

Cursor supports rowIndex being set to null currently, but this generally doesn't occur due to Cursor clamping the row indexes.

This uses the Cursor's null rowIndex as an 'Invalid record selected' state, and updates the record view to show a message when the rowIndex is null.

Related issues

#1895 - Option 1 - Show a notification and a blank card

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this is not relevant here
  • 🙋 no, because I need help

Screenshots / Screencasts

image

@Spoffy Spoffy added the preview Launch preview deployment of this PR label Oct 21, 2025
@Spoffy Spoffy force-pushed the spoffy/fix-record-card-when-hidden-by-acl-null-rowindex branch from 0fd1d8e to 6527461 Compare October 21, 2025 17:19
@David-Fabijan
Copy link

This will be really helpful. Thank you!

@berhalak berhalak self-requested a review October 27, 2025 15:16
const cursor = await section.findWait('.selected_cursor', 1000);
let cursor: WebElement;
try {
cursor = await section.findWait('.selected_cursor', 1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment here, what was wrong, and why there might not be cursor in a section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Launch preview deployment of this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants