Add design document for user-scoped change groups#2
Closed
Conversation
Proposes how signed-in users can start a change group (with a required note) so that all their edits are tagged with that group as they navigate the site. Covers the core concurrency challenge (the current=1 signal in sqlite-history-json is global) and a solution that wraps execute_write_fn to activate/deactivate the group within each atomic write callback. Also proposes changes to Datasette itself — most importantly a wrap_write plugin hook and threading request context into write paths — that would eliminate the need for monkey-patching. https://claude.ai/code/session_01PGyxWeZRNxTsmw7S8ZYGyC
Contributor
Author
|
Here's the design document Claude Opus 4.6 came up with: https://github.com/datasette/datasette-sqlite-history-json/blob/38360848cc0458ca339c77a92de98ef25f84ec3b/docs/design-change-groups.md |
Contributor
Author
|
Closing this PR because we don't need that proposed design document in our |
Contributor
Author
|
This did however inspire a new Datasette experimental plugin hook, implemented here: |
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.
Proposes how signed-in users can start a change group (with a required note) so that all their edits are tagged with that group as they navigate the site. Covers the core concurrency challenge (the current=1 signal in sqlite-history-json is global) and a solution that wraps execute_write_fn to activate/deactivate the group within each atomic write callback.
Also proposes changes to Datasette itself — most importantly a wrap_write plugin hook and threading request context into write paths — that would eliminate the need for monkey-patching.
https://claude.ai/code/session_01PGyxWeZRNxTsmw7S8ZYGyC