Skip to content

Sync #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jun 19, 2025
Merged

Sync #73

Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c3b4f0c
claude code is crazy
Jun 17, 2025
03a89a3
cleanup
rmusser01 Jun 17, 2025
29984de
tests
rmusser01 Jun 17, 2025
40eac8f
Merge branch 'dev' of https://github.com/rmusser01/tldw_chatbook into…
rmusser01 Jun 17, 2025
73c8e39
CC
rmusser01 Jun 17, 2025
6481c40
Merge branch 'dev' of https://github.com/rmusser01/tldw_chatbook into…
rmusser01 Jun 17, 2025
b694c0a
cc
rmusser01 Jun 17, 2025
6d5a50c
cc2
rmusser01 Jun 18, 2025
eaecf08
cc3
rmusser01 Jun 18, 2025
865564d
CC4
rmusser01 Jun 18, 2025
09a6927
cc5
rmusser01 Jun 18, 2025
32bc2f8
before the wave
rmusser01 Jun 18, 2025
f91a007
Note templates
rmusser01 Jun 18, 2025
5c538d6
command palette actions
rmusser01 Jun 18, 2025
62cac8d
overnight"
rmusser01 Jun 18, 2025
2d59d09
cc6
rmusser01 Jun 19, 2025
e9a3137
c
rmusser01 Jun 19, 2025
3325b15
cc7
rmusser01 Jun 19, 2025
4be83c1
RAG deps fix
rmusser01 Jun 19, 2025
8e84537
Merge branch 'dev' of https://github.com/rmusser01/tldw_chatbook into…
rmusser01 Jun 19, 2025
456d0d1
test fixes
rmusser01 Jun 19, 2025
f10e320
Merge branch 'dev' of https://github.com/rmusser00/tldw_chatbook into…
rmusser01 Jun 19, 2025
e8da096
cc8
rmusser01 Jun 19, 2025
c137cd5
cc9
rmusser01 Jun 19, 2025
77a1e36
cc10
rmusser01 Jun 19, 2025
ac0791e
uhhh, notes sync and?
rmusser01 Jun 19, 2025
8d3bc99
notes upgrade
rmusser01 Jun 19, 2025
59b3141
notes+
rmusser01 Jun 19, 2025
8e62f79
notes++
rmusser01 Jun 19, 2025
d3aad3e
well, sync crashes but notes UX is nicer...
rmusser01 Jun 19, 2025
f7883a2
Notes ++++
rmusser01 Jun 19, 2025
455814d
First stab at a vibe coded notes syncing implementation.
rmusser01 Jun 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Notes ++++
  • Loading branch information
rmusser01 committed Jun 19, 2025
commit f7883a2f5ff66b9e22997905a1f7b0b49017cb75
Binary file added Screenshot 2025-06-19 at 3.30.16 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 18 additions & 19 deletions tldw_chatbook/Widgets/notes_sync_widget.py
Original file line number Diff line number Diff line change
@@ -14,9 +14,10 @@
from textual.css.query import NoMatches
from rich.text import Text
from rich.table import Table
from loguru import logger
#
# Local Imports
from ..Notes.sync_service import SyncDirection, ConflictResolution
from ..Notes.sync_engine import SyncDirection, ConflictResolution
from textual.screen import ModalScreen
#
########################################################################################################################
@@ -261,20 +262,18 @@ def compose(self) -> ComposeResult:

with Horizontal(classes="sync-controls"):
yield Select(
[(SyncDirection.BIDIRECTIONAL.value, "Bidirectional"),
(SyncDirection.DISK_TO_DB.value, "Disk → Database"),
(SyncDirection.DB_TO_DISK.value, "Database → Disk")],
id="sync-direction-select",
value=SyncDirection.BIDIRECTIONAL.value
[("bidirectional", "Bidirectional"),
("disk_to_db", "Disk → Database"),
("db_to_disk", "Database → Disk")],
id="sync-direction-select"
)

yield Select(
[(ConflictResolution.ASK.value, "Ask on Conflict"),
(ConflictResolution.NEWER_WINS.value, "Newer Wins"),
(ConflictResolution.DB_WINS.value, "Database Wins"),
(ConflictResolution.DISK_WINS.value, "Disk Wins")],
id="sync-conflict-select",
value=ConflictResolution.ASK.value
[("ask", "Ask on Conflict"),
("newer_wins", "Newer Wins"),
("db_wins", "Database Wins"),
("disk_wins", "Disk Wins")],
id="sync-conflict-select"
)

with Horizontal(classes="sync-controls"):
@@ -305,8 +304,7 @@ def compose(self) -> ComposeResult:
("synced", "Synced"),
("changed", "Changed"),
("conflicts", "Conflicts")],
id="sync-status-filter",
value="all"
id="sync-status-filter"
)
yield Button("Refresh", id="sync-refresh-status-button")

@@ -388,11 +386,12 @@ def refresh_notes_status(self):
("Design Review", "conflict"),
]

with container:
for title, status in example_notes:
with Horizontal(classes="sync-note-item"):
container.mount(Static(title))
container.mount(SyncStatusIcon(status))
for title, status in example_notes:
item_container = Horizontal(classes="sync-note-item")
title_widget = Static(title)
status_widget = SyncStatusIcon(status)
container.mount(item_container)
item_container.mount(title_widget, status_widget)

async def start_sync(self, folder: Path, direction: SyncDirection,
conflict_resolution: ConflictResolution):