Skip to content
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

convert Repliear to use the row versioning strategy #158

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9d8e3d8
re-write to use the row versioning strategy and rails.
tantaman Nov 9, 2023
4c74663
switch to snapshot isolation
tantaman Nov 9, 2023
aa5f268
update comment id scheme so we can use Rails with it
tantaman Nov 10, 2023
a7ecac1
fix the back button
tantaman Nov 10, 2023
6088cb0
remove more custom comment code
tantaman Nov 10, 2023
e7ae173
remove special case for comment pull
tantaman Nov 10, 2023
557ae19
remove todos from schema, remove irrelevant comments from cvr, factor…
tantaman Nov 13, 2023
2257996
remove extraneous code
tantaman Nov 30, 2023
423e7b9
remove `useExclusiveEffect` and skip sync if tab is unfocused
tantaman Nov 30, 2023
3679ee0
lowercased schemaVersion for replicache_meta
tantaman Nov 30, 2023
de9a16c
rowversion -> version
tantaman Nov 30, 2023
efbf027
cvr -> client_view
tantaman Nov 30, 2023
a35223f
order -> version / client_view_version
tantaman Nov 30, 2023
226b4cf
row_id -> entity_id, row_version -> entity_version, tbl -> entity
tantaman Nov 30, 2023
2b95be4
remove comments related to a different cvr design
tantaman Nov 30, 2023
69bf58b
fix the title of the app. todo -> repliear
tantaman Nov 30, 2023
5148f44
add favicon
tantaman Nov 30, 2023
0d0f259
remove commented out CVR query
tantaman Nov 30, 2023
207657f
update client_view to make progress if many tabs sync at once
tantaman Nov 30, 2023
dd1ffc7
Revert "update client_view to make progress if many tabs sync at once"
tantaman Dec 1, 2023
a541701
update to replicache 14
tantaman Dec 4, 2023
3bb9399
throw error if we fail a mutation twice
tantaman Dec 4, 2023
cfefc45
CVE revision: fast forward on old cookie, maintain mutation consisten…
tantaman Dec 8, 2023
a3a11ac
fetch the old value of the diff from `allIssueMap`
tantaman Dec 8, 2023
8b88baf
fix missing decode in `useQueryState`
tantaman Dec 11, 2023
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
2 changes: 1 addition & 1 deletion client/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const App = ({rep, undoManager}: AppProps) => {
const ev = new EventSource(`/api/replicache/poke?channel=poke`);
ev.onmessage = async () => {
console.log('Receive poke. Pulling');
return rep.pull();
void rep.pull();
};
return () => ev.close();
}, []);
Expand Down
9 changes: 2 additions & 7 deletions client/src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ export function reducer(
};
}
}

return state;
}

function diffReducer(state: State, diff: Diff): State {
Expand All @@ -150,11 +148,8 @@ function diffReducer(state: State, diff: Diff): State {
newViewIssueCount++;
}
if (state.filters.issuesFilter(newIssue)) {
newFilteredIssues.splice(
sortedIndexBy(newFilteredIssues, newIssue, orderIteratee),
0,
newIssue,
);
const idx = sortedIndexBy(newFilteredIssues, newIssue, orderIteratee);
newFilteredIssues.splice(idx, 0, newIssue);
}
}
function del(key: string, oldValue: ReadonlyJSONValue) {
Expand Down
8 changes: 3 additions & 5 deletions notes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# TODO:

- multiple selections for filter infinite loop problem
aboodman marked this conversation as resolved.
Show resolved Hide resolved
- diff problem and duplicate id(s)

psql -d postgres -c 'create database repliear2'

- Deletion culling tagged to prior CVR?
- Viewed page sync?

- do check db for cvr so if we drop db we re-sync. rather than this cookie reconstitution
Loading