Skip to content

feat: per-connection description dialect (markdown or wiki) - #107

Merged
f3rdy merged 5 commits into
masterfrom
feat/issue-106-description-dialect
Aug 13, 2026
Merged

f3rdy merged 5 commits into
masterfrom
feat/issue-106-description-dialect

Conversation

@f3rdy

@f3rdy f3rdy commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Closes #106.

Problem

markdown_to_wiki() ran on every description with no way to opt out, so text that
is already legacy wiki markup was rewritten on upload: a # ordered-list item
became an h1. heading, because the Markdown heading rule matches first. Instances
whose house format is built on panel macros and # lists could not be served.

Change

The dialect a description is authored in is a property of the instance, so it lives
on the connection:

  • Connection.description_dialect: Literal["markdown", "wiki"], default markdown
  • resolved in exactly one place on the write path (resolve_description_dialect()),
    then handed to the service layer; services/issues.py no longer decides whether to
    convert - it calls render_description(), the single place that branches
  • --description-dialect {markdown,wiki} on create issue and issue update for a
    one-off deviation
  • connect add sets it (and keeps the stored value when updating without the option),
    connect list and connect show display it

ADF stays out of scope; the field is a string set rather than a boolean so a third
dialect can be added with the v3 migration (#96) without breaking the config format.
DoR templates and validation levels are untouched.

Behaviour

  • wiki sends the description byte-for-byte, on create and on update
  • markdown behaves exactly as the current release; the converter and its tests are
    unchanged
  • a config file without the new key loads without migration and defaults to markdown
  • option > connection setting > default

Verification

989 tests pass, all pre-commit hooks green (ruff, mypy, bandit, coverage). New tests
cover the model, config round-trip and legacy load, dialect resolution, the CLI
override on both commands, the connect surface, and a regression test that uploads a
panel macro, an h3. heading and a # ordered list and asserts the payload equals
the input.

Note: .claude/ai-usage-prompt.md was edited in place instead of regenerated,
because regenerating it from a local template currently drops documented sections
(#105).

f3rdy added 5 commits August 13, 2026 15:58
Connections declare which dialect their descriptions are authored in.
"markdown" keeps today's conversion to Jira wiki markup, "wiki" marks an
instance whose house format is already wiki markup. Existing config files
load without migration and default to "markdown".

The field is a string set rather than a boolean so a third dialect can be
added later without breaking the config format.

Refs #106
create() and update() take the dialect the write path resolved instead of
converting unconditionally. render_description() is the only place that
decides: "markdown" converts as before, "wiki" sends the string verbatim,
so a description built from panel macros and wiki ordered lists survives
byte-for-byte.

Refs #106
Both commands that send a description resolve the dialect in one call to
resolve_description_dialect() and pass the result to the service layer:
--description-dialect wins over the connection setting, which wins over the
default. The help texts say which dialect fits which instance.

Fixes #106
"connect add" sets the dialect and keeps the stored one when updating a
connection without the option; "connect list" and "connect show" display it,
so the setting is visible without reading connections.toml.

Refs #106
README gets the short version of the trade-off, the AI usage prompt lists the
new option on create and update. The prompt is edited in place rather than
regenerated: rendering it from a local template currently drops documented
features (#105).

Refs #106
@f3rdy
f3rdy merged commit 5c1411e into master Aug 13, 2026
5 checks passed
@f3rdy
f3rdy deleted the feat/issue-106-description-dialect branch August 13, 2026 15:49
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.

Descriptions authored in wiki markup are rewritten on upload (# ordered lists become h1)

1 participant