Skip to content

added a state to hold the current text being typed#845

Merged
timea-solid merged 4 commits into
stagingfrom
rdfinputbugfix
Jul 24, 2026
Merged

added a state to hold the current text being typed#845
timea-solid merged 4 commits into
stagingfrom
rdfinputbugfix

Conversation

@timea-solid

Copy link
Copy Markdown
Member

Fixes the #843 bug

@timea-solid timea-solid self-assigned this Jul 24, 2026
@timea-solid timea-solid moved this to In progress in SolidOS NLNet UI Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

The new localInputValue lifecycle currently risks rendering the input blank/stale due to being cleared and then always preferred by the render selection logic.

Pull request overview

This PR addresses issue #843 (“input typing is faster than saving of value”) by introducing a local, reactive state to keep the RDF input responsive while asynchronous store updates are in flight.

Changes:

  • Added a @state()-backed localInputValue to decouple displayed input text from slower RDF store persistence.
  • Updated render logic to prefer the local value while updates are in flight (or pending).
  • Minor dependency lockfile update (electron-to-chromium patch bump).
File summaries
File Description
src/components/rdf-input/RDFInput.ts Adds local input state and integrates it into the render/update pipeline to prevent UI lag during async saves.
package-lock.json Updates a transitive dev dependency version/integrity entry.

Review details

Comments suppressed due to low confidence (1)

src/components/rdf-input/RDFInput.ts:204

  • Clearing localInputValue to '' immediately after a successful save can cause the input to briefly render empty while _updateInFlight is still true, and also interacts badly with the inputValue selection logic. It's safer to leave localInputValue as-is (it already holds what the user typed) and let the render logic decide when to fall back to the store value.
    try {
      await this.storeContext.store.updater.updateMany(toDeleteSt, toInsertSt as any)
      this.storeVersion += 1
      this.localInputValue = ''
    } catch (err) {
  • Files reviewed: 1/2 changed files
  • Comments generated: 1
  • Review effort level: Low

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/rdf-input/RDFInput.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@timea-solid
timea-solid merged commit 7dc01e9 into staging Jul 24, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in SolidOS NLNet UI Jul 24, 2026
@timea-solid timea-solid linked an issue Jul 24, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

The rdf form input typing is faster than saving of value

3 participants