feat: enrich human gates with Markdown rendering and file links#114
Draft
PolyphonyRequiem wants to merge 3 commits intomicrosoft:mainfrom
Draft
feat: enrich human gates with Markdown rendering and file links#114PolyphonyRequiem wants to merge 3 commits intomicrosoft:mainfrom
PolyphonyRequiem wants to merge 3 commits intomicrosoft:mainfrom
Conversation
- Terminal gates: wrap prompt text in Rich Markdown for proper heading,
bold, list, and link rendering in the CLI
- Web dashboard: add GET /api/files/{path} endpoint to serve local files
relative to the workflow root with security guards (path traversal
protection, extension allowlist, 1MB size limit)
- Web dashboard: add FileViewer modal component for viewing linked files
with Markdown rendering support
- Web dashboard: intercept relative links in gate prompts to open the
FileViewer instead of navigating away; external URLs still open in
new tabs
- Tests: 13 file API security tests + 3 gate Markdown rendering tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
=======================================
Coverage ? 84.86%
=======================================
Files ? 53
Lines ? 7194
Branches ? 0
=======================================
Hits ? 6105
Misses ? 1089
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enriches human gate prompts with proper Markdown rendering and interactive file links in both the terminal CLI and web dashboard.
Terminal (CLI)
Web Dashboard
GET /api/files/{path}endpoint serves local files relative to the workflow rootFileViewermodal component renders linked files (Markdown for .md, monospace for others)[plan](./plan.md)) open the FileViewer instead of navigating awayFiles Changed
src/conductor/gates/human.py-- Wrap prompt in RichMarkdownsrc/conductor/web/server.py-- Add workflow_root param + file API endpointsrc/conductor/cli/run.py-- Pass workflow_root to WebDashboardsrc/conductor/web/frontend/.../FileViewer.tsx-- NEW modal file viewersrc/conductor/web/frontend/.../GateDetail.tsx-- Link interception + isRelativeFileLink helpertests/test_web/test_server.py-- 13 new file API security teststests/test_gates/test_human.py-- 3 new/updated Markdown rendering testsTesting
All 79 tests pass across both test suites. No regressions.