Skip to content

Fix dashboard stats assignment_value_stale warnings#2419

Merged
myieye merged 2 commits into
developfrom
cursor/fix-dashboard-assignment-value-stale
Jul 7, 2026
Merged

Fix dashboard stats assignment_value_stale warnings#2419
myieye merged 2 commits into
developfrom
cursor/fix-dashboard-assignment-value-stale

Conversation

@hahn-kev

@hahn-kev hahn-kev commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace assignment-expression arrow callbacks on dashboard writing-system row fields with patch helpers that use Object.assign.
  • Use block-bodied callbacks for top-level dashboard stat assignments to avoid Svelte assignment_value_stale runtime warnings in the browser console.

Fixes the warnings in the console:

[svelte] assignment_value_staleAssignment to `definition` property (src/​​project/​​dashboard/​​dashboard-stats.svelte.ts:78:74) 
will evaluate to the right-hand side, not the value of `definition` following the assignment.
This may result in unexpected behaviour.https://svelte.dev/e/assignment_value_stale

Test plan

  • Open the project dashboard in Fw Lite viewer
  • Confirm writing-system completion stats still load progressively
  • Verify the browser console no longer shows assignment_value_stale warnings from dashboard-stats.svelte.ts

Made with Cursor

Patch writing-system row fields via helpers instead of assignment-expression arrow bodies on $state proxies.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a4875dcc-cd08-437e-8a22-61af84e13dab

📥 Commits

Reviewing files that changed from the base of the PR and between 0f35616 and 0524afd.

📒 Files selected for processing (1)
  • frontend/viewer/src/project/dashboard/dashboard-stats.svelte.ts

📝 Walkthrough

Walkthrough

Adds two private helper methods to DashboardStats that patch vernacular and analysis rows by wsId using Object.assign. Updates the load method's primary count assignments to block-form callbacks and reroutes per-writing-system field updates through the new patch helpers instead of direct row mutation.

Changes

Dashboard Stats Patch Helpers

Layer / File(s) Summary
Row patching helpers and load wiring
frontend/viewer/src/project/dashboard/dashboard-stats.svelte.ts
Adds #patchVernacularRow and #patchAnalysisRow private methods that find a row by wsId and apply partial field patches via Object.assign; updates load's primary count callbacks to block-form assignments and reroutes per-writing-system lexemeForm/citationForm/exampleSentence/gloss/definition updates through the new helpers instead of mutating row directly.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit patches row by row,
No more direct mutation, watch it go!
By wsId we find our place,
Object.assign, a tidy embrace 🐇
Hop along, the stats now glow.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing dashboard stats assignment_value_stale warnings.
Description check ✅ Passed The description accurately matches the code changes and test plan for fixing the Svelte warning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-dashboard-assignment-value-stale

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.

@argos-ci

argos-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 7, 2026, 12:57 PM

@myieye myieye merged commit 2c4798a into develop Jul 7, 2026
27 of 28 checks passed
@myieye myieye deleted the cursor/fix-dashboard-assignment-value-stale branch July 7, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants