Skip to content

Preserve rich formatting on message edits#93

Closed
delaneyb wants to merge 1 commit into
stablyai:mainfrom
Yellowbox-AU:fix-edit-formatting
Closed

Preserve rich formatting on message edits#93
delaneyb wants to merge 1 commit into
stablyai:mainfrom
Yellowbox-AU:fix-edit-formatting

Conversation

@delaneyb

@delaneyb delaneyb commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserves supported rich formatting when editing Slack messages via chat.update, without changing plain text edit behavior.

What changed

  • Adds an opt-in mode to the existing rich-text block converter for inline formatting such as links, bold, italic, strike, inline code, mentions, and broadcasts.
  • Uses that mode from message edit so formatted edits include Slack rich_text blocks.
  • Keeps plain text edits text-only.
  • Keeps existing message send behavior unchanged.

Tests

  • Plain text edits do not send blocks.
  • Literal angle-bracket text such as <fix> stays escaped text and does not become blocks.
  • Message URL edits with <https://example.com|label> send rich-text blocks.
  • Channel + timestamp edits with formatting send rich-text blocks.
  • Rich-text converter default behavior is unchanged unless the new opt-in flag is used.

Prepared by GPT-5.5 Medium using a custom sub-agent review process.

This change was reviewed by 5 sub-agents:

  • 1 decomposition reviewer.
  • 1 bailout-gate reviewer for the chat.update formatting approach.
  • 2 implementation/test/maintainer reviewers.
  • 1 follow-up confirmation reviewer for the literal angle-bracket regression fix.

@delaneyb
delaneyb force-pushed the fix-edit-formatting branch 2 times, most recently from a873c8b to 812f3cb Compare May 13, 2026 12:32
@AmethystLiang
AmethystLiang self-requested a review May 21, 2026 03:05
AmethystLiang added a commit that referenced this pull request May 30, 2026
Merged replacement for #93 after maintainer pushes to the contributor fork were rejected with 403.

Included fixes from review:
- Keep inline-only edits text-only.
- Preserve channel/usergroup/broadcast tokens in rich-text conversion.
- Preserve http(s) and mailto manual links.
- Keep non-URL angle-bracket tokens literal.
- Sync README and bundled agent-slack skill docs.

Validation:
- bun test
- bun run typecheck
- bun run format:check
- bun run lint
- CI Build, Lint, Test passed
- Independent xhigh Codex review: no blocking findings
@AmethystLiang

Copy link
Copy Markdown
Contributor

Thanks for the PR. I reviewed this hard and found a few edge-case regressions in the original head branch (channel/usergroup/manual-link handling and inline-only edit behavior). GitHub rejected maintainer pushes to the contributor fork with 403, so I merged a maintainer replacement PR with the original change plus fixes: #100.

Validation on the replacement:

  • bun test
  • bun run typecheck
  • bun run format:check
  • bun run lint
  • CI Build, Lint, Test passed
  • independent xhigh Codex review: no blocking findings

Closing this PR as superseded by #100 / merge commit 94ecafe.

@AmethystLiang

Copy link
Copy Markdown
Contributor

Superseded by #100, which includes this PR plus review fixes and has been merged.

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