Fix scope migration: public root properties, private presets, link-shared views - #369
Closed
felixevers wants to merge 1 commit into
Closed
felixevers wants to merge 1 commit into
felixevers wants to merge 1 commit into
Conversation
Existing property definitions become public on the root location, existing task presets become private and formerly link-shared saved views keep a link-only SHARED visibility instead of turning private. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UpemKsko6UowS3SmrN4TdQ
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.
Summary
Follow-up to #359. The
add_scope_visibilitymigration now maps existing rows the way the product expects:publicand are stored at the root location (the root with the largest subtree, so multi-root databases pick the main tree deterministically). Definitions that already had a node keep it and become public.privatewith no location (previously ownerless presets were made public on the root).link_sharedkeep a new link-only visibilitySHAREDand keep their node (or get the root if they had none). Everything else becomesprivate. Previously every view was forced to private and lost its node, which broke link sharing.To make that possible,
ScopeVisibilitygainsSHARED:can_read_scoped) but never appear in list queries for non-owners;SHAREDis only accepted for saved views (presets and property definitions reject it withBAD_REQUEST). Downgrade mapsshared/publicviews back tolink_shared.ScopeChiprenders the shared state; translations added for all six locales; GraphQL types and the translation module regenerated.docs/VIEWS_ARCHITECTURE.md.Validation
link_sharedviews with and without a node, private view,GLOBALownerless andPERSONALpresets): upgrade, downgrade and re-upgrade produce the mapping described above.schema.graphql.ruff check backend --exclude database/migrations: clean.pytest tests/unit tests/integration(with Redis): 143 passed. Three new integration tests cover shared views.npm run lint,npm run check-translations,npm run test: clean, 153 tests passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01UpemKsko6UowS3SmrN4TdQ
Generated by Claude Code