Skip to content

feat: fancy history scrubber#4142

Draft
404Wolf wants to merge 22 commits into
mainfrom
wolf/fancy-new-history
Draft

feat: fancy history scrubber#4142
404Wolf wants to merge 22 commits into
mainfrom
wolf/fancy-new-history

Conversation

@404Wolf

@404Wolf 404Wolf commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Notes:

  • The sync service handlers are sort of a mess, since it's all by-hand, and there's no utopa so it's all manual. I think that we should just merge as-is, and then I can follow up with utopa + axum with nice typegen.
  • Right now I walk backwards from the present until the start of the document to "sessionize," which is "fast enough," and we request old versions rather than checking out on the frontend. Yes, we could just do it on the frontend, but the reason I did it in sync service is because I think that in the future it'd be easy to add a sqllite table that stores shallow snapshots + updates (sort of like the WAL + snapshot pattern), and then we could store a indexed timestamp column and make it super fast to checkout by time. Likewise, we could materialize the sessions history (e.g. old sessions will never change).
  • Pins are storing location. Technically we could have concurrent updates, but the timeline view would make it impossible to choose which frontier set you want, and I think that it's not a big deal
  • Forks don't copy over the entire history right now, but we should add support for that later
  • My "activity" algorithm is slightly dumb and mostly cosmetic, don't over think it. It's just using the existing sessions and is super best effort. Once we have tables for updates and sessions we can think about a more clever and accurate way to do activity (if we care)
  • Control/cmd + click to delete a tag. Is this too hidden? Do we care to add support for renaming tags?
  • I decided to have the history overlay just perfectly overlay on top of the existing lexical rather than touching the existing lexical, and then changing that new lexical. Right now I just re-render since it's simple but we can properly checkout as a follow up.
  • I was having a weird "node has already been removed" print span if I tried to remove the history view and then switched to another block. I fixed this by making it live the entire lifetime of the block and just hiding it. Maybe there is a better way?
  • I left the old history viewer but stopped using it
  • I'll hex/clean up the sql stuff in a follow up later
image

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dd581c01-9401-461c-9598-b74d81bc81c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

there's some gross manual typing with the endpoints since we don't have proper typegen yet for sync service, but I'll add it in a follow-up

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant