An edit made just before a page reload never syncs to the server
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Start with contentcuration/contentcuration/frontend/shared/data/serverSync.js, especially syncChanges and the changeRevs handling on page load. Trace how unsynced entries in IndexedDB's changesForSyncing are selected, then add the Jest coverage named in the acceptance criteria for an entry absent from changeRevs. Done when that test passes and the issue's reload steps show the change reaching the server within one sync interval without publishing.
Written by the indexing model from the issue text.
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
An edit made less than ~2 seconds before reloading the channel editor stays in the browser's IndexedDB changesForSyncing table with no synced flag. After the reload the editor shows the edit, read from IndexedDB, but POST /api/sync/ never sends it.
syncChanges in serverSync.js sends only the revs in the in-memory changeRevs array, and nothing repopulates it on page load. Only forceServerSync, which publishing calls, sends every unsynced change.
Expected behavior
A change left unsynced by a reload reaches the server on the next sync after the page loads.
User-facing consequences
- Collaborators, other tabs and other devices never see the edit.
- The server copy stays stale until the author publishes.
Steps to reproduce
- Open a channel with an exercise and open the exercise's Questions tab in the edit modal.
- Click Edit on a question, type a word into the prompt and click Close.
- Within 2 seconds, reload the page.
- Wait 20 seconds, then open
/api/assessmentitem?contentnode=<exercise node id>:raw_datalacks the typed word. - In DevTools > Application > IndexedDB >
KolibriStudio>changesForSyncing, the change is still there, unsynced.
Context
- #4100 (closed, fixed in #4126) flushes the debounced sync before unload; a reload inside the debounce window still leaves the change unsynced, and nothing sends it afterwards.
- Reproduced on the #6484 branch at c880aca0d6 (Chromium 159, local dev server);
serverSync.jsis identical onunstable.
Acceptance Criteria
- After the steps above, the server's
raw_datacontains the typed word within one sync interval of the reload, without publishing. - A Jest test covers a change present in
changesForSyncingbut not inchangeRevsbeing sent by the next sync.
AI usage
Claude Code found this during automated browser QA of #6484, traced it to serverSync.js and drafted this issue.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 327
- Avg merge
- 17h 5m
- Merged PRs (30d)
- 25
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from learningequality/studio
-
Community library status changes don't update `date_updated`Possibly taken @ArpitaSamanta10 claimed this 13 days ago. Opencommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
learningequality/studio#6414 · 8 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Activation key can activate a different account whose email differs only in casePossibly taken @Madhu-priya123 claimed this 4 days ago. OpenDEV: backend
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
learningequality/studio#6410 · 2 comments ·
Maintainers usually reply within 1 day
-
DEV: backend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
learningequality/studio#6409 ·
Maintainers usually reply within 1 day
-
DEV: backend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
learningequality/studio#6407 ·
Maintainers usually reply within 1 day
-
Stripe webhook accepts events when no webhook secret is configuredPossibly taken @adibmbrk claimed this 14 days ago. Opencommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
learningequality/studio#6404 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in learningequality/studio
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
yetone/alma-releases#782 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Pomax/markdown-editor#193 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cboard-org/cboard#2449 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
BinaryBaconLabs/todo-app#50 ·
Maintainers usually reply within 1 day
-
bug server testing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blamechris/chroxy#9435 ·
Maintainers usually reply within 1 day