Hi! I've created a fork of CherryTree v1.6.3 that migrates the internal architecture to use command, observer, and document model/viewer patterns, and adds Rich Tables (table cells with rich text formatting and embedded widgets). The fork was developed interactively with Claude Code. I tested it extensively and added GUI-level regression tests. Initially, I was thinking of making a PR, just for the rich tables. But as the architecture has changed, and it’s a major change, I think it would be better to just have a discussion. I'm sharing it here in case this version is useful to CherryTree — whether as inspiration, as code to merge, or simply as a separate fork.
The fork is packaged as cherrytree+docmodel (with a purple cherry icon) and can be installed side-by-side with CherryTree via .deb. Both load the same documents, but cherrytree+docmodel saves as .ctbx to avoid accidentally overwriting, in case the original cherrytree loads a database with rich tables. I've been using cherrytree+docmodel for a week now, with my personal database of size 307MB and 718 Nodes, making use of the rich tables, and it has been as robust and functional as the original cherrytree.
Fork: https://github.com/martinakos/cherrytree/tree/document_model
Release: https://github.com/martinakos/cherrytree/releases/tag/v1.6.3-docmodel.1
Motivation:
I've been using CherryTree since 2018, when I moved from Windows to Linux as my daily driver. The only software I missed from Windows was OneNote, which I used extensively. CherryTree was the closest thing I found on Linux, but one feature I always missed was organising charts and snapshots from my experiments inside tables. There were already issues requesting improved tables back then. I kept waiting and hoping for that feature to be developed, but eight years later we still have the same limited tables.
This past Christmas, I decided to try implementing Rich Tables myself using Claude Code. It wasn't as simple as I thought. I could quickly get a functional rich table, but the undo/redo wouldn't work. The existing snapshot-based undo/redo mechanism couldn't handle rich tables well, where each cell is essentially like a rich text node. I hit many edge cases and got stuck several times.
Eventually, I decided to change the underlying architecture so it could support Rich Tables.
I migrated the architecture to use command, observer, and document model/viewer patterns. This makes functional, unlimited undo/redo possible. And makes CherryTree more extensible. Then I added the Rich Tables.
The fork includes an ARCHITECTURE_CHANGES.md document with a detailed comparison of the original and new architectures, including an honest assessment of the trade-offs. The fork also includes extensive GUI-level regression tests, undo/redo correctness tests, and document model unit tests.
The rich tables are inserted with the same insert table button and choosing the Rich Table checkbox.
You can see a snapshot of an example rich table:
and buttons showing the undo/redo drop down list:
I hope this fork is useful for CherryTree. Any feedback welcome! @giuspen
Martin
Hi! I've created a fork of CherryTree v1.6.3 that migrates the internal architecture to use command, observer, and document model/viewer patterns, and adds Rich Tables (table cells with rich text formatting and embedded widgets). The fork was developed interactively with Claude Code. I tested it extensively and added GUI-level regression tests. Initially, I was thinking of making a PR, just for the rich tables. But as the architecture has changed, and it’s a major change, I think it would be better to just have a discussion. I'm sharing it here in case this version is useful to CherryTree — whether as inspiration, as code to merge, or simply as a separate fork.
The fork is packaged as cherrytree+docmodel (with a purple cherry icon) and can be installed side-by-side with CherryTree via .deb. Both load the same documents, but cherrytree+docmodel saves as .ctbx to avoid accidentally overwriting, in case the original cherrytree loads a database with rich tables. I've been using cherrytree+docmodel for a week now, with my personal database of size 307MB and 718 Nodes, making use of the rich tables, and it has been as robust and functional as the original cherrytree.
Fork: https://github.com/martinakos/cherrytree/tree/document_model
Release: https://github.com/martinakos/cherrytree/releases/tag/v1.6.3-docmodel.1
Motivation:
I've been using CherryTree since 2018, when I moved from Windows to Linux as my daily driver. The only software I missed from Windows was OneNote, which I used extensively. CherryTree was the closest thing I found on Linux, but one feature I always missed was organising charts and snapshots from my experiments inside tables. There were already issues requesting improved tables back then. I kept waiting and hoping for that feature to be developed, but eight years later we still have the same limited tables.
This past Christmas, I decided to try implementing Rich Tables myself using Claude Code. It wasn't as simple as I thought. I could quickly get a functional rich table, but the undo/redo wouldn't work. The existing snapshot-based undo/redo mechanism couldn't handle rich tables well, where each cell is essentially like a rich text node. I hit many edge cases and got stuck several times.
Eventually, I decided to change the underlying architecture so it could support Rich Tables.
I migrated the architecture to use command, observer, and document model/viewer patterns. This makes functional, unlimited undo/redo possible. And makes CherryTree more extensible. Then I added the Rich Tables.
The fork includes an ARCHITECTURE_CHANGES.md document with a detailed comparison of the original and new architectures, including an honest assessment of the trade-offs. The fork also includes extensive GUI-level regression tests, undo/redo correctness tests, and document model unit tests.
The rich tables are inserted with the same insert table button and choosing the Rich Table checkbox.
You can see a snapshot of an example rich table:
and buttons showing the undo/redo drop down list:
I hope this fork is useful for CherryTree. Any feedback welcome! @giuspen
Martin