Skip to content

feat: merge develop into main - #7

Merged
ts-76 merged 5 commits into
mainfrom
develop
Mar 19, 2026
Merged

ts-76 merged 5 commits into
mainfrom
develop

Conversation

@ts-76

@ts-76 ts-76 commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Changes

  • feat: add dev switcher for Slidev decks
  • feat: stabilize dev bridge and presentation runner
  • refactor: reorganize slidev manager modules
  • Refine presentation resolution and fixtures

ts-76 added 5 commits March 18, 2026 18:47
Reorganize the plugin into feature-oriented source directories, trim the README back to introduction-first usage guidance, and align the package version with the current pre-1.0 release stage.\n\nAlso remove unused browser automation devDependencies while keeping the verified build, lint, and test flows intact.\n\nCo-Authored-By: Mastra Code (openai/gpt-5.4) <noreply@mastra.ai>
Copilot AI review requested due to automatic review settings March 19, 2026 15:39
@ts-76
ts-76 merged commit a519155 into main Mar 19, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges develop into main, substantially expanding vite-plugin-slidev-manager with a dev “bridge” server (stable URL + deck switching), a more structured selector/invocation flow, and a broader test/fixture/doc/tooling update.

Changes:

  • Add a dev-server bridge that proxies Slidev dev servers and supports in-page deck switching via a generated custom-nav-controls.vue.
  • Refactor presentation discovery/selection/invocation into dedicated modules (presentation/*, selector/*, invocation/*) and add extensive Vitest coverage under tests/.
  • Update tooling and repo scaffolding (bun + oxlint/oxfmt, fixtures, docs, CI workflow, package metadata).

Reviewed changes

Copilot reviewed 43 out of 48 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vitest.config.ts Switch Vitest include glob to tests/**/*.test.ts.
tsconfig.json Set rootDir and normalize include formatting.
tests/presentation-runner.test.ts Adds tests for spawn specs, workspace actions, and HTTP readiness.
tests/presentation-helpers.test.ts Adds tests for slug/label/key/manifest helper behavior.
tests/metadata-loader.test.ts Adds tests for metadata discovery, scripts, and relative path handling.
tests/invocation.test.ts Adds tests for CLI passthrough and browser-export switching.
tests/index.test.ts Adds tests for selector behavior (single option, preselect, non-interactive).
tests/generated-switcher-template.test.ts Adds tests for generated Vue SFC and escaping/behavior.
tests/flow.test.ts Adds tests for presentationsDir resolution logic.
tests/dev-switcher.test.ts Adds tests for writing and cleanup of generated switcher files.
tests/dev-server-bridge.test.ts Adds integration-style tests for bridge proxying and switching.
src/utils/process-utils.ts Adds terminal input restoration and safe error-message extraction.
src/selector/ui-copy.ts Centralizes action-specific UI copy.
src/selector/selection.ts Centralizes selection resolution and error messaging.
src/selector/presentation-selector.tsx Refactors selector to use new metadata/helpers and adds preselect/non-interactive handling.
src/selector/flow.ts Implements dev/build flows using invocation + bridge runner.
src/selector/bridge-shutdown.ts Adds SIGINT/SIGTERM shutdown handling for the bridge.
src/presentation/presentation-runner.ts Adds process spawning utilities, package-manager detection, port/base parsing, browser opening, and readiness checks.
src/presentation/presentation-helpers.ts Adds slug/label/key helpers and manifest conversion.
src/presentation/metadata-loader.ts Replaces old loader with richer metadata (actions, scripts, presentationDir) and improved parsing.
src/metadata-loader.ts Removes legacy metadata loader.
src/metadata-loader.test.ts Removes legacy tests for old loader.
src/invocation/index.ts Adds invocation resolution + arg merging + browser-export switching.
src/index.ts Replaces inline logic with structured invocation + selector flows; adds build/export configuration options.
src/bridge/generated-switcher-template.ts Adds HTML-escaped, deterministic Vue SFC generator for deck switch UI.
src/bridge/dev-switcher.ts Adds generation/cleanup for custom-nav-controls.vue with ownership detection.
src/bridge/dev-server-bridge.ts Adds stable bridge server, proxying, switching endpoint, and dev-session lifecycle management.
package.json Bumps version, updates deps/tooling/scripts, updates peer ranges, sets bun packageManager.
fixture/workspace/vite.config.ts Adds runnable workspace fixture Vite config.
fixture/workspace/presentations/team-update/slides.md Adds workspace fixture deck content.
fixture/workspace/presentations/product-intro/slides.md Adds workspace fixture deck content.
fixture/workspace/package.json Adds workspace fixture package setup and scripts.
fixture/normal/vite.config.ts Adds runnable “normal” fixture Vite config.
fixture/normal/presentations/team-update/slides.md Adds normal fixture deck content.
fixture/normal/presentations/product-intro/slides.md Adds normal fixture deck content.
fixture/normal/package.json Adds normal fixture package setup and scripts.
fixture/README.md Documents how to run fixtures locally.
docs/ja/README.md Adds Japanese documentation for new flows/features.
biome.json Removes Biome config (tooling migration).
README.md Updates main README to match new features/usage/fixtures.
CHANGELOG.md Minor formatting cleanup.
.oxlintrc.json Adds oxlint configuration.
.oxfmtrc.json Adds oxfmt configuration.
.github/workflows/release-manager.yml Updates CI to bun-based install/lint/test/build and adjusts publish steps.
Comments suppressed due to low confidence (1)

src/selector/presentation-selector.tsx:197

  • For dev actions, createOptionFromMetadata always prefers slides mode when slidesPath exists (even if the presentation has a workspace dev script). That prevents workspace presentations that also ship a slides.md from running via their configured package manager script. If workspace support is intended, the workspace branch should likely take precedence when meta.workspace && meta.scripts.dev (or generally meta.scripts[action]) before falling back to direct Slidev CLI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/selector/flow.ts
Comment on lines +34 to +44
const { options, selected, cancelled } = selection;
if (options.length === 0) {
console.error(
`No Slidev presentations with a ${invocation.action} entrypoint were found.`,
);
process.exit(1);
}

if (cancelled || !selected) {
process.exit(0);
}
Comment on lines +207 to +224
export async function openBrowser(url: string): Promise<void> {
const command =
process.platform === 'win32'
? { file: 'cmd', args: ['/c', 'start', '', url] }
: process.platform === 'darwin'
? { file: 'open', args: [url] }
: { file: 'xdg-open', args: [url] };

await new Promise<void>((resolve, reject) => {
const child = spawn(command.file, command.args, {
stdio: 'ignore',
detached: true,
});

child.on('error', reject);
child.unref();
resolve();
});
Comment on lines +383 to +385
const body = await readRequestBody(req);

await proxyHttpRequestWithHosts(req, res, upstreamPort, body, ['127.0.0.1', 'localhost']);
Comment on lines +48 to +54
<summary class="smgr-trigger" title="Switch deck">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="4" width="18" height="13" rx="2" />
<path d="M8 20h8" />
<path d="M12 17v3" />
</svg>
</summary>
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