Skip to content

Add text messages to the LocalSend Share menu - #14480

Open
Gberfield wants to merge 12 commits into
omacom:quattrofrom
Gberfield:add-share-text
Open

Gberfield wants to merge 12 commits into
omacom:quattrofrom
Gberfield:add-share-text

Conversation

@Gberfield

@Gberfield Gberfield commented Oct 7, 2026 •

Copy link
Copy Markdown

Add Text to the Share menu and omarchy share text [message] to the CLI. Text opens a multiline composer; direct arguments skip it. Cancel, Escape, and whitespace-only input do not launch LocalSend. The composer's title, buttons, prompt, and shortcut hint use omarchy-i18n, with English fallback for missing or empty translations.

Text and clipboard sharing use LocalSend's native --text route below 64 KiB. Larger messages use a private message.txt file through LocalSend's existing file route, preserving oversized clipboard sharing. The directory/file modes are 0700/0600, with normal-exit and scheduling-failure cleanup. Flag-like messages and literal shell-like text remain data. File/folder selection remains unchanged. The independently authored native-clipboard contribution in #6979 is credited in the reconciliation commit; its branch is unchanged.

The detached user service reports scheduling and LocalSend failures through desktop notifications. A fixed text-service description keeps payloads out of command-derived manager messages, and environment expansion is disabled. Native text still appears in process arguments and can appear in application journal _CMDLINE; private temporary-file cleanup is not secure erasure.

The composer uses system Python and pins GTK/GDK 3, using existing default dependencies. Menu/CLI wiring, catalogs, manual updates, regression tests, and a detailed validation report are included.

Validation at dc2ff87b11ba458a059d14233e6698b86ecc22bc, October 19, 2026 EDT:

  • Built a new local-source ISO and performed a fresh installed-Omarchy VM run. Seven installed launcher/composer/helper/catalog hashes matched the tested commit before graphical testing; syncing tests alone was not counted as updating the runtime.
  • Full graphical suite: 7/10 files passed in 242 seconds; three failed. menu-test.sh failed menu bar position changes to left; shell-surfaces-test.sh failed apps menu opens. These retain stale upstream navigation expectations. panels-test.sh additionally timed out waiting for Weather's SAN FRANCISCO, although its failure screenshot visibly contains that text and native-resolution OCR reads it. That file remains failed; the scaled-OCR mismatch was not isolated. The acceptance runner/files were unchanged.
  • Targeted installed-VM LocalSend checks passed: actual Share-menu composer, multiline Unicode and literal/flag-like native text, clipboard text, rendered staging of a 191,999-byte oversized clipboard, private-file permissions/cleanup, real user-service integration, and a visible notification from an actual LocalSend startup failure. No recipient was selected and nothing was sent to another device.
  • 16 real GTK localization/input cases passed: synthetic German, missing/empty translation fallback, English, and unknown-language fallback, each with Ctrl+Enter, Cancel, Escape, and blank-input checks. All five label values were checked on real GTK objects, visible controls were inspected, and translations never entered the exact shared payload. The tiled screenshots omit a separate title bar; window/application title properties were checked directly.
  • The four automated localization cases passed with both current and synthetically completed German catalogs. The sharing suite passed 27 tests plus the real menu-parser assertion.
  • The owned VM stopped and its disposable overlay was removed; the new ISO/base, screenshots, and logs were retained. The full graphical suite is not green. No new aggregate CLI/shell-suite pass is claimed.

Historical October 17 installed-VM evidence comprised two complete 8/10 graphical runs and passing targeted LocalSend probes. Those results remain separately identified in the validation report, which records exact commits, commands, versions, all current failing files, screenshots/log locations, cleanup, and limitations. This replaces the earlier incorrect statement that the graphical suite was never run.

Current-head CI follow-up, October 22, 2026 EDT: translation workflow 39352459082 exists at a509021d2a745e01ab89e2db2950d0cb31b1fe60 and is completed with conclusion action_required, with zero jobs. The earlier comment saying this head had no workflow runs is now stale. Upstream contribution approval remains required; no successful translation-CI execution is claimed. Keep open and unmerged.

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; this documentation-only update introduces no new actionable issues.

Summary

Adds Text to the LocalSend Share menu and CLI, with a translated multiline composer, error notifications, and a private-file fallback for large messages.

  • Share menus and commands now send text through LocalSend.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Share Text] --> B{Message supplied?}
  B -->|No| C[Translated composer]
  B -->|Yes| D[Check message]
  C --> D
  D -->|Cancelled or blank| E[Exit without LocalSend]
  D -->|Nonblank| F{At least 64 KiB?}
  F -->|Yes| G[Private text file]
  F -->|No| H[Native text argument]
  G --> I[Detached service]
  H --> I
  I --> J[LocalSend]
  J -->|Error| K[Desktop notification]
  J --> L[Clean up private file]
Loading

Reviews (11) · Last reviewed commit: "Document current-head graphical LocalSen..." · Reviewed by Greptile

Comment thread bin/omarchy-menu-share Resolved
@jandrusk

jandrusk commented Oct 8, 2026

Copy link
Copy Markdown

Nice addition, and good that the text is passed as a literal argument rather than through the shell.

One privacy nit: without --description, systemd-run uses the full command line as the unit description. The "Started run-u….service - /bin/bash -c … omarchy-share-text " line then lands in the user journal with the whole message in it. People will paste things like Wi-Fi passwords or one-time codes into this, so I'd keep it out of the logs:

systemd-run --user --quiet --collect --expand-environment=no \
  --description="Share text with LocalSend" /bin/bash -c '…' omarchy-share-text " $text"

(LocalSend's own argv will still contain it, but that's unavoidable with --text.)

Also related: #6979 switches the Clipboard entry to LocalSend's native --text too. It may be worth aligning the two.

Adapt guilhermetk's independently authored clipboard sharing and launch-failure handling from omacom#6979 (05213b6). Route clipboard text through the existing protected text launcher, preserving fixed service descriptions, literal arguments, flag protection, and detached error notifications. Keep file/folder selection unchanged and report scheduling failures.

Add focused clipboard and file-picker regressions and update the manual. Focused suite: 19 passed, one GTK/GDK import check skipped; menu assertion, Bash syntax and whitespace checks passed. Full CLI/shell suites, ShellCheck, real systemd/journal and Omarchy desktop acceptance were unavailable in this environment.

Co-authored-by: Guilherme Tiscoski <github@guilhermetiscoski.com>
Comment thread bin/omarchy-menu-share Resolved
Test multiline Unicode output, button sensitivity, Ctrl+Enter, Cancel, Escape and rejection of blank Ctrl+Enter input against real GTK widgets. Run each scenario in a fresh process with a timeout and report an explicit skip when GTK or a display is unavailable.

Validated all four scenarios on GTK 3 under Xvfb. The existing 20 sharing tests also pass without skips with GI installed; ShellCheck and Bash syntax checks pass.
Bring the contribution branch up to quattro at 4e059ac without rewriting history. Add the Text menu label and sharing error strings to the English catalogs, route notifications through omarchy-i18n, and cover language-specific clipboard errors with the real catalog lookup helper.

Validation: 21 sharing tests without skips, four real GTK scenarios under Xvfb, the complete CLI suite with GNU awk, ShellCheck, Bash syntax, catalog structure/number checks, and extract-scan --check. LocalSend 1.18.2 stages the synthetic flag-like Unicode text in its GUI (31 bytes after trimming).

The complete i18n shell test reaches an unrelated root-only locale-generator failure in this container; its catalog structure and extraction checks pass. Real systemd/journal and installed Omarchy desktop acceptance still require a systemd-backed Omarchy host. Neither pull request is merged.
Document the focused, GTK, CLI, translation and real LocalSend checks, the complete pre-sync shell comparison, and remaining live-systemd, desktop and upstream workflow approval requirements.
Comment thread default/localsend/share-text.py Resolved
@Gberfield

Copy link
Copy Markdown
Author

The oversized-clipboard issue in review r4305015851 is fixed in a777fa8, with focused regression coverage and the live validation report updated in docs/localsend-sharing-validation.md.

Could an upstream maintainer approve the pending Check translation structure workflow for this contribution? Run https://github.com/omacom/omarchy/actions/runs/39084738026 is action_required with zero jobs. The contributor account has read-only upstream access, so it cannot approve it. Local structural i18n and extraction checks pass; that is not a claim that the GitHub workflow ran.

Comment thread test/shell.d/share-text-i18n-test.sh Resolved
@greptile-apps

greptile-apps Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@Gberfield

Gberfield commented Oct 22, 2026 •

Copy link
Copy Markdown
Author

Follow-up on validation and the pending upstream workflow:

  • Current head a509021d2a745e01ab89e2db2950d0cb31b1fe60 differs from graphically validated dc2ff87b11ba458a059d14233e6698b86ecc22bc only in docs/localsend-sharing-validation.md; no runtime or test source changed in that final commit. The installed-VM results documented in the description therefore still cover the same feature source, with their original limitations.
  • Fresh local focused checks on a509021d: 27 sharing tests and four composer-localization cases pass. These are offline checks, not another installed graphical-suite run.
  • Fresh disposable-guest real GTK widget cases also pass: accept, cancel, Escape and blank-shortcut rejection. All 5,140 committed file contents matched the selected whole runtime before/after. No recipient was selected and no message was sent. GI emitted an asyncio.get_event_loop_policy deprecation warning; it did not fail the tests.
  • The current head has no Actions workflow runs. Earlier translation run https://github.com/omacom/omarchy/actions/runs/39084738026 remains completed with conclusion action_required at older head a777fa86. Could a maintainer approve that contribution workflow and arrange the translation check on the current head? I cannot approve upstream Actions with contributor access. A successful Greptile check is not translation CI.

The previous graphical aggregate remains 7/10, with the menu, Apps-grid and Weather OCR failures documented rather than claimed fixed here. Those test changes are being consolidated into #15550, #15465 and #12828; superseded #16028 is closed. #16095's bar-reveal fix and draft #16182's panel timing tests remain separate. No full-green graphical acceptance claim or merge request is made by this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants