Repository navigation
Conversation
…er the window opens The global store took the config and path results out of the useQueries list once. useQueries replaces its results whenever its options change, and the options read the connection status, so the two results kept the state from before the server connected: the path stayed empty and ~ file links were never links.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #65772
Type of change
What does this PR do?
A path under the home folder in a reply, such as
~/notes/todo.md, is a link when the file exists, and a click opens it. Until now the app never held the server's home folder, so the~expansion from #65689 never ran.sync.tsxtook the config and path results out of theuseQuerieslist once.useQueriesreplaces its results whenever its options change, and the options read the connection status. A context created before the server connected kept the two results from before the connection.createGlobalQueriesinglobal-sync/bootstrap.tsreads each result from the list when it is asked for. The global store'spathandconfiggetters call it.~/…there.sequenceDiagram participant S as sync.tsx participant Q as useQueries participant C as connection S->>Q: queries, enabled: connected() = false Q-->>S: [config A, path A] (pending, idle) Note over S: before: keeps A for good C->>Q: connected() = true Q->>Q: replaces the list with [config B, path B] Q->>Q: fetch, result lands in B (home folder known) Note over S: before: still reads A, home = "" Note over S: after: reads list[1] = B when askedHow did you verify your code works?
The desktop app on Windows, built from
dev(7cfd868443) and from this branch, on a server whose default location is underC:\Users\tester, with a session whose reply names~/notes/todo.md(exists),~/notes/missing.mdandsrc/util/format.ts:~/notes/todo.md~/notes/missing.md""C:\Users\testerpackages/app/test-browser/global-queries.test.tscovers a server that connects after the context is created; it fails on the old shape with an empty home folder.Screenshots / recordings
~/notes/todo.mdis plain codeChecklist