[DO NOT MERGE] - Temporary: Latest features - #387
Closed
albertoperdomo2 wants to merge 39 commits into
Closed
Conversation
…ledge Base Sources
…ledge Base Sources
Add puppeteer-core, @sparticuz/chromium for server-side PDF generation, sonner for toast notifications, and unified pipeline packages (remark-parse, remark-rehype, rehype-stringify) for server-side markdown rendering.
Unified pipeline that reuses the same remark/rehype plugins as the client-side MarkdownPreview (GFM, math, bracket math, KaTeX). Vega-Lite charts are rendered to inline SVG server-side via vega/vega-lite APIs. KaTeX CSS and print-friendly styles are inlined for self-contained HTML. Also exports the FALLBACK theme constant from visualization-theme.ts so the PDF renderer can use the light theme for charts.
POST /api/w/[slug]/files/export-pdf reads markdown from the workspace agent, renders to self-contained HTML, generates PDF via Puppeteer, and returns it as a download. Client utility handles the fetch-blob-download flow.
Add "Export as PDF" option to the right-click context menu for .md files in the KB file tree. The callback chain flows through FileTreePanel, KnowledgeNavigationPanel, and WorkspaceShell with sonner toast feedback for loading/success/error states. Add Toaster to root layout.
Add system libraries required by headless Chromium to the container runtime image. Regenerate integration coverage badge.
- Extract shared helpers (jsonResponse, isValidWorkspacePath, readWorkspaceFile) into workspace-file-response.ts, deduplicating download and export-pdf routes - Simplify rehype vega-lite plugin: delete replaceInTree, capture parent/index during visit, replace nodes directly - Share remark/rehype plugin arrays from markdown-plugins.ts (remove "use client" directive) instead of redeclaring in renderer - Remove redundant Content-Disposition header from export-pdf route - Add tests for markdown-to-pdf-html, workspace-file-export-pdf, and workspace-file-response (23 new tests)
The for-loop over shared plugin arrays breaks unified's chained type inference, causing a type error at the remarkRehype bridge. Use an explicit any annotation on the processor variable.
Add a useEffect that keeps the ?path= query param in sync with the active file when in knowledge mode. This enables page reload to preserve the open file and shareable links to specific KB articles.
Large KB articles with inline charts and equations were hitting the 64 KB payload limit, returning HTTP 413 to MCP clients.
The ?path= param seeded openFilePaths and activeFilePath state but never loaded the file content into fileCache, so the file tab appeared empty on page load. Add a useEffect that fetches the initial file content once the workspace agent is ready.
Expand all ancestor folders of the active file path so the file is visible in the tree when opened via URL deep link or tab switch.
The previous approach used useMemo+useState for initial expanded state, which only applied on first render. When file tree nodes load after mount (async workspace agent), the expanded state was never updated. Rewrite to use a useEffect on both nodes and activePath so ancestor folders expand whenever either changes.
…-011) - H-001: Add rehype-sanitize with SVG-aware schema, disable JS and block external requests in Puppeteer via request interception - H-002: Add in-memory semaphore limiting concurrent exports to 2, return 503 when saturated - H-003: Enforce 512KB markdown size limit, return 413 when exceeded - H-004: Handle base64-encoded file content from workspace agent - H-005: Cap Vega chart rendering at 20 per document, process sequentially - H-006: Embed KaTeX font files as base64 data URIs for offline rendering - H-007: Validate JSON body shape (object, not array/null/primitive) - H-008: Wrap client download in try/catch/finally for cleanup - H-009: Scope toast IDs per file path to avoid collisions - H-010: Wrap handler in top-level try/catch returning 500 - H-011: Move view.finalize() to finally block Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves ixjosemi's review on PR #384: - Preserve stored PAT in mergeConnectorConfigWithPreservedOAuth so GitHub connectors can be edited (e.g. add a pinned repo) after creation. - Persist normalized parsed config on create/PATCH (trimmed PAT, deduped repos, dropped stray keys); remove the now-redundant host special-case. - Dedupe pinned repos case-insensitively (GitHub repo names are). - Remove unreachable `return null` in mcp/server-url.ts to keep the connector-type switch exhaustive. - Log before falling back to [] in getLinkedRepositoriesForOwner. - Commit a valid pending repo input on save instead of dropping it. - Document pinned-repos-as-advisory as an accepted risk in ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The root lockfile was bloated by `pnpm add` generating a full dependency tree instead of keeping it in the workspace package. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node 24 strict types reject Uint8Array as BodyInit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the PNG favicon with the Arche SVG logo (base64-encoded) for the PDF export header. Fixes broken image rendering caused by unescaped quotes in the inline SVG data URI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Increase top margin to 2cm, remove conflicting @page CSS margin, and collapse h1:first-child margin-top so page 1 and subsequent pages have consistent spacing below the logo header. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mp/latest-features
…mp/latest-features
Bumps MCP_MAX_BODY_BYTES from 1 MiB to 10 MiB to accommodate larger JSON-RPC tool payloads that were hitting HTTP 413 payload_too_large. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
/build |
|
📦 PR Workspace Image Built Successfully Default (amd64): Optional arm64: |
|
📦 PR Image Built Successfully Default (amd64): Optional arm64: |
After initial setup, users had no way to add or remove pinned repositories from an existing GitHub connector. This adds a dedicated settings dialog (following the Zendesk/Meta Ads pattern) that loads the current config, lets users manage pinned repos via chips, and saves via PATCH without resending the PAT. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The AGENTS.md linked repositories section referenced compare_commits as a GitHub MCP tool, but it does not exist in the GitHub Copilot MCP server's tool inventory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mp/latest-features
Contributor
Author
|
/build |
|
📦 PR Workspace Image Built Successfully Default (amd64): Optional arm64: |
|
📦 PR Image Built Successfully Default (amd64): Optional arm64: |
…lure Update the withLinkedRepositories test to match the corrected tool list. Add reportOnFailure to shared vitest coverage config so coverage reports are written even when a test fails, preventing badges from showing "not-run". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The setExpanded updater mutated seenNodesRef inside the callback, which is an impurity that breaks under React strict mode's double invocation. Replace with a pure `!(path in prev)` check against the previous state so directories expand correctly on deep-linked reload. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
/build |
|
📦 PR Workspace Image Built Successfully Default (amd64): Optional arm64: |
|
📦 PR Image Built Successfully Default (amd64): Optional arm64: |
…trict mode" This reverts commit c3a3b72.
Contributor
Author
|
/build |
|
📦 PR Workspace Image Built Successfully Default (amd64): Optional arm64: |
|
📦 PR Image Built Successfully Default (amd64): Optional arm64: |
- Track user-collapsed directories in a ref so they aren't re-expanded on unrelated navigation, but do expand when navigating into them - Persist open file tabs and active file to localStorage so they survive page reload (URL ?path= still wins for active file on deep links) - Load all restored files on mount, not just the URL-provided one Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
/build |
|
📦 PR Workspace Image Built Successfully Default (amd64): Optional arm64: |
|
📦 PR Image Built Successfully Default (amd64): Optional arm64: |
Contributor
Author
|
Superseded. |
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.
No description provided.