Skip to content

Conversation

@darinkelkhoff
Copy link
Contributor

@darinkelkhoff darinkelkhoff commented Feb 2, 2026

Summary

Introduces Quick Saved Views — a layer on top of Saved Views that enables frontends to present certain views with special, faster access (e.g., pinned views with optional record counts).

  • New QuickSavedView entity with per-user settings (sortOrder, doCount) linked many-to-one to SavedView
  • SavedViewsMetaDataProvider gains opt-in isQuickSavedViewEnabled flag, plus a userLevelRecordSecurityLock option applicable to all saved view tables
    • Also, sharedViews becomes opt-out (by default is turned on (should this be reversed?))
  • QuerySavedViewProcess enriches saved view results with quick view values (type, sortOrder, doCount) when enabled; gracefully no-ops when disabled
  • Memory backend gets a feature flag (buildJoinCrossProductFromJoinContext) to correctly include security-required joins in cross-product construction — needed for queries involving record security locks via joins
  • Comprehensive test coverage including security lock scenarios with shared views and all-access keys

Details

QuickSavedView entity

  • Joins to SavedView via savedViewId, scoped per user via userId
  • Unique constraint on (savedViewId, userId) prevents duplicates
  • sortOrder controls display position; doCount tells frontend whether to execute count queries

SavedViewsMetaDataProvider enhancements

  • withIsQuickSavedViewEnabled(true) registers the QuickSavedView table and its join
  • withUserLevelRecordSecurityLock(lock) applies record security across SavedView, SharedSavedView, and QuickSavedView tables
  • SavedView security uses a multi-lock (OR) combining direct ownership and shared access via join

MemoryRecordStore fix

  • New opt-in flag to build join cross-products from JoinsContext (which includes security joins) rather than only explicit QueryJoin inputs
    • This was discovered in the test that tried to select saved views through shared saved views (which is a join added via security). For now, just this test class opts in to the feature.
  • Defaults to off for backwards compatibility; intended to become the default in a future release

Test plan

  • Quick views correctly enrich saved view query results with type, sortOrder, and doCount
  • Process works correctly when QuickSavedView is not enabled in the instance
  • Applications can override lookupQuickViews() for custom behavior
  • Security locks correctly restrict access per user, with shared view and all-access scenarios

🤖 Generated with Claude Code

…ons over Saved Views, for special (quicker) presentation in a frontend.

- Update SavedViewsMetaDataProvider to add new table & join if requested by a flag;  also allow caller to pass in a RecordSecurityLock to apply to all tables, and to opt-out of sharing via flag.
- Update QuerySavedViewProcess to lookup QuickViews and add data from them to the SavedView result objects, if QuickViews are enabled in the instance.
…rrectly for queries that require joins for security fields.

In theory this should eventually become the default behavior, but it does change behavior (even if the change is more correct), so this initial commit puts the new behavior behind a feature flag.
@darinkelkhoff darinkelkhoff marked this pull request as ready for review February 3, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants