Skip to content

fix(composer): a link alone sends; options and send button side by side - #7

Merged
CLCK0622 merged 1 commit into
mainfrom
fix/composer-send-options
Oct 16, 2026
Merged

CLCK0622 merged 1 commit into
mainfrom
fix/composer-send-options

Conversation

@CLCK0622

Copy link
Copy Markdown
Member

Why

  • A draft that is only a link didn't send. It failed with "Invalid presentation content or output size."
  • The send option lived inside the send button's menu, unlike the display picker next to it.
  • The composer forgot the option every time it opened.

What

Fixes

  • Link-only and mixed drafts to a Virtual Display:
    • Cause: the Virtual Display path passed on only the text and the single picture. A link-only draft reached the generator with no assets, and the client refused it before any request went out. A link sent next to text was dropped silently.
    • Fix: both send paths now build the Content from the whole draft with AppModel.draftAssets.
  • Just upload with a Virtual Display selected: now saves, instead of failing with "Virtual Displays publish their own frame". Upload ignores the target.
  • Add Link accepts only what the backend accepts: http/https with a real host and no credentials. A bare example.com reads as https. Pasted non-web URLs (mailto:, app schemes) go in as text rather than failing after upload with invalid_asset.

Composer layout

  • The toolbar now reads [Send option ▾] [Display ▾] [Send]. The option menu is a Picker like the display menu, and the send button stands alone. It reads "Save" for Just upload.
  • ⌘↩ sends. ⌥1…⌥4 still pick an option with the menu closed.

Remembered option

  • The option you picked last is restored when the composer opens. Only explicit choices (menu or ⌥n) are stored, never automatic switches.
  • Opened from a display page with a remembered "Just upload": starts on Push to device, as before.
  • A remembered "Show as-is": starts on Push to device. It switches back as soon as the draft becomes one picture, or text on a Virtual Display.

Verification

  • swift build is clean, and swift test passes 79 tests. New ComposerDraftTests cover link-only drafts, ordering, and link normalisation/refusals.
  • ./Scripts/build-app.sh debug builds and signs.
  • Not checked visually yet: the installed inklet Portal was running, and a second instance with the same bundle ID would fight it for the hot key and menu bar item.

- A link on its own now sends to a Virtual Display. That path passed on
  only the text and the one picture, so a link-only draft reached the
  generator as nothing at all ("Invalid presentation content or output
  size.") and a link next to text was dropped without a word. Every send
  now builds its Content from the whole draft (`AppModel.draftAssets`).
- Just upload goes through whichever display is still picked. With a
  Virtual Display selected it used to fail with "Virtual Displays publish
  their own frame."
- Add Link takes only what the backend takes: http or https with a real
  host, no credentials. A bare example.com reads as https. A pasted
  non-web URL (mailto:, an app scheme) goes in as text instead of being
  refused after upload.
- The send option is a menu of its own beside the display menu, with a
  separate Send button (Save for Just upload). ⌘↩ and ⌥1…⌥4 work as
  before.
- The option picked last comes back next time. A display page still
  starts on Push to device instead of Just upload, and a remembered Show
  as-is waits for a draft it can take: one picture.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@CLCK0622
CLCK0622 merged commit cfd8e27 into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants