Skip to content

feat(comments): make the comment dialect configurable per connection - #148

Merged
f3rdy merged 2 commits into
masterfrom
feat/134-comment-dialect
Oct 21, 2026
Merged

f3rdy merged 2 commits into
masterfrom
feat/134-comment-dialect

Conversation

@f3rdy

@f3rdy f3rdy commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Why (from #134, measured 2026-09-20)

Descriptions and comments take different upload paths: descriptions are converted per description_dialect, comments were posted raw. The same source text therefore rendered differently depending on the target field — a Markdown list in a comment stayed literal. On instances where API-posted comments cannot be edited, the first shot is the only shot.

What

  • New per-connection field comment_dialect (markdown | wiki), settable via budjira connect add --comment-dialect, shown by connect add/connect show.
  • budjira comment add and comment update accept --dialect to deviate for a single call (analogous to --description-dialect).
  • The --embed path posts ADF (REST v3) verbatim; no dialect applies there — documented in help, README and the AI prompt.
  • Conversion reuses render_description: one text-to-wiki path, signature untouched (the external checker script keeps working), and the authored dialect is a connection property with the wire format behind it — the shape epic Epic: Migrate jira-python client from REST API v2 to v3 (ADF) #96 (ADF) needs.

Default / compatibility

Default is wiki — the historical raw behaviour, bit-identical. Existing connections keep working unchanged: the TOML serializer learned the new key, and old connections.toml files load via the model default. The asymmetry becomes configurable, not reversed: descriptions default markdown, comments default wiki, and an instance that differs per field stays representable.

Which dialect applies where: descriptions follow description_dialect, comments follow comment_dialect; the CLI override wins over the connection setting in both cases. This sentence is now in the README and in utils/description.py's module docstring — the trap #134 grew out of.

Tests

  • Service: add/update each in both directions — Markdown source converted, Wiki source unchanged, default raw (4 tests).
  • CLI: connection setting used, --dialect override wins, embed path applies no dialect; existing comment tests migrated from the deprecated facade to comments.add (the CLI now passes the dialect through the service layer directly).
  • Resolution: override > connection > default-wiki; model default test; connect add stores and defaults correctly (2 tests).
  • Full suite: 1435 passed, 3 skipped; ruff, mypy, bandit green.
  • budjira ai usage-prompt --plain output checked; regenerated prompt committed separately.

Closes #134

f3rdy added 2 commits October 21, 2026 13:49
Descriptions run through the dialect converter while comments were
always posted raw, so one written dialect meant two different things
depending on the target field. The connection gains comment_dialect
(markdown|wiki); the default 'wiki' preserves the historical raw
behaviour exactly, and an instance whose authors write Markdown in
comments as well can now serve both fields with one written dialect.
comment add/update accept --dialect to deviate for a single call; the
--embed ADF path stays verbatim. The asymmetry becomes configurable
rather than reversed.

The conversion reuses render_description, keeping one text-to-wiki
path that a future ADF wire format (epic #96) can sit behind. The
settings serializer whitelists connection fields for TOML and learned
the new key; old connections.toml files load unchanged via the model
default.

Closes #134
Regenerate .claude/ai-usage-prompt.md after the configurable comment
dialect (comment_dialect, --dialect on comment add/update).
@f3rdy
f3rdy merged commit 49b15e7 into master Oct 21, 2026
5 checks passed
@f3rdy
f3rdy deleted the feat/134-comment-dialect branch October 21, 2026 12:31
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.

feat(comments): make the comment dialect configurable, like descriptions

1 participant