Skip to content

docs(projects): warn that Linear's API rejects emoji for --icon#147

Merged
flipbit03 merged 2 commits into
mainfrom
feat/146-docs-projects-icon-help-text-claims-emoj
May 7, 2026
Merged

docs(projects): warn that Linear's API rejects emoji for --icon#147
flipbit03 merged 2 commits into
mainfrom
feat/146-docs-projects-icon-help-text-claims-emoj

Conversation

@flipbit03
Copy link
Copy Markdown
Owner

@flipbit03 flipbit03 commented May 7, 2026

Summary

Linear's API actually accepts emoji as --icon — but only as colon-wrapped shortcodes (:repeat:, :computer:), not as raw unicode characters (🔁). The schema docstring "Can be an emoji or a decorative icon type" is technically truthful; the gap is purely UX — users (and SDKs, and LLMs) reasonably read "emoji" as "the unicode character" and hit a confusing INVALID_INPUT error.

This PR updates the --icon help text on projects create and projects update to document both accepted formats and explicitly warn that raw unicode is rejected:

--icon <ICON>
    Project icon: an emoji shortcode like ":repeat:" (NOT raw unicode 🔁) or a Linear
    named icon like "Computer". Linear's API rejects raw unicode emoji.

lineark-sdk and the request layer are unchanged — the rejection of raw unicode comes purely from Linear's upstream validator (proven by the raw urllib reproduction in #146).

Verified accepted/rejected formats

Input Result
🔁 (raw unicode) ❌ rejected
:repeat: (shortcode) ✅ accepted
:computer: ✅ accepted
Computer (PascalCase named icon) ✅ accepted
computer (lowercase) ❌ rejected
sweat_smile (no colons) ❌ rejected
sweat-smile (hyphens) ❌ rejected

Test plan

  • make check passes
  • make test passes
  • New regression tests projects_create_help_icon_documents_accepted_formats and projects_update_help_icon_documents_accepted_formats assert both :repeat: and Computer examples plus the "rejects raw unicode emoji" warning appear in --help output
  • New projects_update_help_shows_flags covers the previously-untested update help surface
  • Manually verified the rendered --help output

Out of scope (good follow-ups)

  • Auto-translate raw unicode → shortcode in lineark (🔁:repeat:) so the schema docstring's promise becomes literally true at the CLI layer.
  • lineark icons list subcommand bundling Linear's named-icon catalog.
  • Apply the same wording fix to other icon fields (teams, custom views, dashboards, documents, project templates) once their accepted formats are verified.

Closes #146

flipbit03 added 2 commits May 7, 2026 15:36
Linear's GraphQL schema docstring claims project icons accept emoji or
icon names, but the upstream server-side validator rejects emoji at
runtime with a confusing INVALID_INPUT error. Update --icon help text on
both `projects create` and `projects update` to recommend named icons
(e.g. "Computer", "Database") and call out the schema/runtime mismatch
so users — especially LLM consumers — don't get misled.

Add regression tests that assert both help screens contain the warning.

Closes #146
Follow-up investigation found Linear's API does accept emoji — but only
as colon-wrapped shortcodes (`:repeat:`, `:computer:`), not as raw
unicode characters (🔁). Two formats work:

  - Emoji shortcodes:  `:repeat:`, `:rocket:`, `:computer:`
  - Named icons:       `Computer`, `Database`

Update --icon help to call out both formats and explicitly warn that
raw unicode emoji are rejected. Update regression tests to assert the
new wording.
@flipbit03 flipbit03 merged commit 0b73ac4 into main May 7, 2026
8 checks passed
@flipbit03 flipbit03 deleted the feat/146-docs-projects-icon-help-text-claims-emoj branch May 7, 2026 21:56
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.

docs(projects): --icon help text claims emoji are accepted but Linear API rejects them

1 participant