Repository navigation
omaq-connect 1.1.0: live theme, file list, presence dot and WCAG contrast - #61
Merged
Merged
Conversation
The client read colors.toml once at start, so after a theme switch it kept the old colors until it was restarted. It now checks the file once a second, as the bar follows the theme, and repaints with the new palette. While Omarchy swaps the theme directory, the previous colors stay.
Tab after :sendfile opens a list above the input line with the folders and files of the typed folder, folders first and files with their size. Typing filters it, up and down choose, tab or enter opens a folder or takes a file into the line, left goes back, and esc closes it. The path stays in the input line, and the next enter sends the file. Names that are not valid UTF-8 or contain control characters are left out, so the list never writes them to the terminal.
While a friend is online, their name in a pane header and in the tab strip runs letter by letter from the theme's accent to a second theme color. That color is the first of green, cyan, magenta, blue and yellow, then the foreground and shades of the accent, that differs from the accent and from the offline name color in OKLab and stays readable on the background. It follows live theme changes. Offline names, names while the client is not online, and names without Omarchy colors keep the name color.
In a narrow pane the sending, receiving, offer and canceled lines were cut at the edge, so the bar, the size and commands such as :cancelfile could vanish; one pane showed only ":can". When a line does not fit, the file name is now shortened with an ellipsis, and the bar, the size and the command move to their own lines.
File list: a name taken from the working folder gets "./", so a name that starts with a quote, a space or "~" sends that file. A deleted working folder, a NUL byte or an unreadable folder shows a message instead of crashing, a quoted path loses both quotes, and typing that turns the line into something else closes the list. The list never takes an entry it does not show: an overlay closes it, and with no room for an entry, enter runs the line. The scan limit counts every examined entry and is 50000. :sendfile: a path that is not valid UTF-8, or a relative path after the working folder was deleted, gives a status message instead of a crash. Theme: a color must be six hex digits, and a theme file that is not valid UTF-8 falls back to the terminal's colors instead of crashing. A new theme that cannot be read keeps the old colors and is retried; after three tries the client uses the terminal's colors. The stamp includes ctime, so restored access reloads. Gradient: the second color must not run through the offline name color, and a row stops at the first segment it has to cut, so a wide character is never skipped. A transfer label too long for the pane wraps, and the name gets its own line.
…q-connect The online gradient is gone. A pane header and the tab strip show each friend's state with the friends bar's dot: online, the name in the foreground color and a green dot; away, an amber dot; offline, the name in the theme's name color with a gray dot and "offline" in the same gray. While the client is not online, the name has no dot. Every color except the rules is raised to at least 4.5:1 against the theme's background, moving towards white or black so its hue stays. The contrast is measured against "background", not the ANSI color0. Away is amber instead of gray, because a raised gray away dot was almost the offline gray in 27 of the 120 readable themes.
The manifest moves to 1.1.0, still Protocol 16. CURRENT.md, the stage index and the terminal-client stage now name 1.1.0 for the terminal client's additions: the live theme reload, the :sendfile file list, the presence dot, WCAG contrast and wrapping transfer lines.
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.
OmaQ 1.1.0 extends the terminal client. The helper and its protocol are unchanged (Protocol 16).
Changes
colors.tomlonce a second and repaints with the new palette. While a new theme cannot be read, the previous colors stay and the file is tried again; after three tries the client uses the terminal's colors, as at a start without a theme.:sendfile:Tabopens a list of the typed folder above the input line: folders first, then files with their size.Tab,→orEnteropens a folder or takes a file;←goes back;Esccloses.Entersends the file.offlinetakes the gray of its dot.backgroundand keeps its hue.:cancelfile.docs/CURRENT.mdand the stage docs.Verification
Run locally after the final change:
make test, including the terminal client's 106 unit tests;make helper,make archand./tests/no-signal-build.sh;./tests/phase2.sh;./tests/phase8.sh: green on the second run. It depends on the Tox network: the first run timed out waiting for the friend request, and an earlier run ended in its cleanup;qmllint ChatSurface.qml pages/ChatPage.qml Service.qml;omarchy plugin validate .;git diff --check;*.sh.