Repository navigation
refactor(statusline): give elements the client's payload and ports to the machine - #535
Merged
Merged
Conversation
… the machine The client's payload is parsed once into the fields the statusline uses, a field of the wrong type reading as absent instead of discarding its neighbours, and replaces the hand-narrowed reading of the payload in the command. Elements receive that payload and a set of ports (environment, home directory, reading a file, running a program) in their context, so what an element reads from the machine is injected and tested with fakes. The renderer takes one input object.
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.
Groundwork for the statusline element groups that read from the machine (git, transcripts, cost ledgers, memory). No behaviour changes.
The client's statusline payload is now parsed once, with a schema, into the fields the line uses; a field of the wrong type reads as absent rather than discarding its neighbours. This replaces the hand-narrowed
payloadViewOfin the command. Elements get that payload and a small set of ports (environment, home directory, reading a file, running a program with a bound on its time and output) in their render context, so what an element reads from the machine is injected and tested with fakes. The renderer takes one input object instead of a growing list of positional arguments, anddocs/architecture.mdgains a section on how the statusline is put together.