Skip to content

Send generated Slack pages inline when paths need shortening - #49449

Merged
brennanb2025 merged 1 commit into
mainfrom
fix/slack-generated-html-paths
Nov 26, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
fix/slack-generated-html-paths

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Generated web page attachments could show private folder names in Slack. Now the whole reply goes as text when one of its pages contains a path that Orca normally shortens in Slack replies. The prose and page source stay in order.

Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​266 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​266
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​19 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10

What Changed

The host checks up to ten eligible HTML pages with the existing Slack path formatter. If any page would change, the normal text route receives the original reply and notes. Clean pages and explicitly selected files retain their original bytes.

Why

The inline text route already shortens recognized local paths. Keeping downloadable pages intact preserves references between the parts of each page.

Linked Issue

STA-18541. Tracked in #49288.

Visual Proof

Seeded delivery mockup comparing the attachment and inline reply

Testing

  • Manual app run. The integration tests exercise the CLI and host with a simulated Slack transport.
  • Added routing, file content, retry, and file-limit coverage.
  • Every test fails on the previous behavior. The routing and file-limit regressions fail there. The remaining cases cover upload and retry behavior that already worked.
  • Focused unit tests, file-limit work counts, typecheck, and changed-file checks passed on Linux.

Performance

The formatter runs only for one to ten candidate pages after attachment admission.

Risk

Level: Low. The host applies the rule to older clients. An updated CLI applies it when an older host asks for attachments. A plain revert restores the previous routing.

AI Disclosure

Review

The mixed-reply fixture shows the same prose and notes reaching the normal reply formatter together.

Agent skill upstream boundary

  • Not applicable.

Notes

One-line HTML attributes and encoded paths can fall outside the existing formatter rules. Oversized text replies can show a truncation note in Slack.

Checklist

  • Scope is focused, with the problem, change, and rationale explained.
  • Risk and revert path are documented.
  • Seeded before-and-after mockup attached.
  • Correctness, security, performance, and platform impact considered.
  • CI for lint, typecheck, tests, and build.

@brennanb2025 brennanb2025 changed the title Shorten private paths in generated Slack HTML attachments Send generated Slack pages inline when paths need shortening Nov 26, 2026
@brennanb2025
brennanb2025 marked this pull request as ready for review November 26, 2026 07:47
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds splitSlackHtmlReply to validate HTML reply documents. It accepts replies with 1 to CONNECTOR_REPLY_MAX_FILES documents when path redaction leaves every document unchanged. Bot and connector reply handling now use this check. Tests cover inline replies, attachment uploads, staging failures, uncertain posts, legacy-host retries, and explicitly selected files.

Merge Risk: Minimal · up to bc88e

Generated HTML pages that would expose local folder names are now sent inline with shortened paths, and clean pages still go out as attachments. No concrete defect remains, and merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Send generated Slack pages inline when paths need shortening" matches the main change. The PR routes a whole reply as inline text when any generated HTML page would change under the Slack p…
Description check Passed The description follows the template sections (ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, Checklist).…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Send generated Slack pages inline when paths need shortening" matches the main change. The PR routes a whole reply as inline text when any generated HTML page would change under the Slack path formatter, instead of sending it as file attachments. The title is short, specific, and uses no vague terms. It is a single sentence under 60 characters.

Full details: Description check

Explanation

The description follows the template sections (ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, Checklist). It explains the change, the mechanism, the rationale, the risk, and the revert path. The Performance section is filled in. Several items are incomplete, though. The Performance section does not finish the required sentence beyond the first clause, and it does not state how the cost was measured. The Level field in Risk still shows the template placeholder text. The Linked Issue section cites STA-18541 but has no 'Fixes #' issue reference. The AI Disclosure section is empty. The Testing section leaves manual testing and CI unchecked. The description also contains a generated LoC block that the author did not write. Overall the description is mostly complete, so the check passes, but the author should fill the remaining gaps before merge.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4c741a6-d3ba-430d-8167-5bc75337a5e6
Commits

Reviewing files that changed from the base of the PR and between d771b10 and bc88e29.

Files selected for processing: 1

  • src/main/runtime/rpc/methods/connectors/connector.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@brennanb2025
brennanb2025 marked this pull request as draft November 26, 2026 07:55
@brennanb2025
brennanb2025 marked this pull request as ready for review November 26, 2026 07:57
@brennanb2025
brennanb2025 marked this pull request as draft November 26, 2026 08:11
@brennanb2025
brennanb2025 force-pushed the fix/slack-generated-html-paths branch from d771b10 to bc88e29 Compare November 26, 2026 08:12
@brennanb2025
brennanb2025 marked this pull request as ready for review November 26, 2026 08:16
@brennanb2025
brennanb2025 merged commit e1cf636 into main Nov 26, 2026
140 of 142 checks 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.

1 participant