Tags: colindean/wifitui
Tags
Fix signal column misalignment in TUI list This commit addresses an issue where the "Signal" column in the network list would become misaligned when SSIDs contained multi-byte characters (such as emojis or non-ASCII text). The root cause was the use of `len()` to calculate the padding for the SSID column. `len()` returns the byte count, but correct TUI alignment requires the visual cell width. Changes: - Replaced `len(title)` with `lipgloss.Width(title)` in `internal/tui/list.go` to calculate padding based on visual width. - Introduced a `truncateString` helper function to safely truncate strings based on their visual width, preventing byte-slicing issues with multi-byte characters. - Updated the truncation logic to use this new helper. This ensures that the signal column remains perfectly aligned regardless of the characters used in the network names or icons.
feat: Update release filename scheme (shazow#95) Updates the release process to use hyphens instead of underscores in filenames. - Updates `.goreleaser.yaml` to use hyphens in `name_template` and `file_name_template`. - Updates `README.md` to reflect the new filename scheme in the installation script. Re: shazow#94 Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
fix(tui): fix race condition when enabling wireless (shazow#80) * fix(tui): fix race condition when enabling wireless This commit resolves two related issues that occurred when re-enabling the wireless radio from the 'Wireless Disabled' view. First, the view would remain stuck after enabling the radio because it was not being popped from the view stack. This is fixed by changing the message sent on success from `connectionSavedMsg` to `popViewMsg`. Second, a race condition in the `networkmanager` backend could cause a subsequent network scan to fail with a "Scanning not allowed while unavailable" error. The `SetWireless` function returned before the device was fully enabled. This is resolved by making `SetWireless` a blocking call that waits for the device to reach the desired state before returning. * fix(tui): correct wireless radio toggle behavior This commit resolves several issues related to enabling and disabling the wireless radio. 1. The UI no longer gets stuck on the "Wireless Disabled" view. The global 'r' keybinding is now ignored when this view is active, allowing the component to correctly handle the key press and trigger a refresh. 2. The misleading "Scanning for networks..." status message that appeared when disabling the radio has been removed. The global handler now correctly pushes the `WirelessDisabledModel` without initiating a scan. 3. The `SetWireless` function in the `networkmanager` backend is now a blocking call, which prevents race conditions by ensuring the device is fully enabled or disabled before proceeding. 4. The 'q' and 'esc' keys in the `WirelessDisabledModel` now quit the application, providing a more consistent user experience. * feat(tui): add delayed re-scan and fix radio toggle flow This commit introduces a new feature and fixes several bugs related to the wireless radio toggle functionality. When re-enabling the wireless radio, if no networks are found in the initial scan, a second scan is now automatically scheduled for 1.5 seconds later. This improves the user experience by giving the radio more time to discover networks. This commit also resolves the following bugs: - The UI no longer gets stuck on the "Wireless Disabled" view after re-enabling the radio. - An incorrect "Scanning for networks..." message no longer appears when the radio is disabled. - A race condition in the `networkmanager` backend has been fixed by making the `SetWireless` function a blocking call. - The 'q' and 'esc' keys in the `WirelessDisabledModel` now consistently quit the application. * fix(tui): correct wireless radio toggle behavior This commit resolves several issues related to enabling and disabling the wireless radio. 1. The UI no longer gets stuck on the "Wireless Disabled" view. The global 'r' keybinding is now ignored when this view is active, allowing the component to correctly handle the key press and trigger a refresh. 2. The misleading "Scanning for networks..." status message that appeared when disabling the radio has been removed. The global handler now correctly pushes the `WirelessDisabledModel` without initiating a scan. 3. The `SetWireless` function in the `networkmanager` backend is now a blocking call, which prevents race conditions by ensuring the device is fully enabled or disabled before proceeding. 4. The 'q' and 'esc' keys in the `WirelessDisabledModel` now quit the application, providing a more consistent user experience. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
fix(.goreleaser.yaml): use x86_64 for amd64 builds (shazow#76) * fix(.goreleaser.yaml): use x86_64 for amd64 builds The nfpms packages were using `amd64` in their filenames instead of `x86_64`. This change adds a `file_name_template` to the `nfpms` section to ensure consistency with the archives. * .goreleaser.yaml: Update description --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Andrey Petrov <[email protected]>
PreviousNext