Skip to content

Conversation

@spring-raining
Copy link
Member

No description provided.

@spring-raining spring-raining self-assigned this Dec 14, 2025
Copilot AI review requested due to automatic review settings December 14, 2025 17:00
Copy link
Contributor

Copilot AI left a comment

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 adds a new preview page route and refactors the edit routing system to use file paths instead of content IDs. The changes enable direct navigation to a preview-only view and improve the mapping between files and their editor routes.

Key Changes:

  • Added /preview route for accessing preview without an editor
  • Refactored edit routes from /edit/$contentId to /edit/$ using file paths
  • Updated project setup logic to handle entryContext configuration and properly map entry files

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/viola/src/stores/sandbox.ts Added defaultDraftDir constant and config parsing on project load
packages/viola/src/stores/content.ts Added getFileByFilename method to lookup content by filename
packages/viola/src/stores/actions/setup-project.ts Refactored to use entryContext and file paths for content mapping
packages/viola/src/stores/actions/content-file.ts Updated to use entryPath and defaultDraftDir for new content files
packages/viola/src/routes/(main)/_layout/preview.tsx New preview-only route with tab setup
packages/viola/src/routes/(main)/_layout/edit/$contentId.tsx Removed old content ID-based route
packages/viola/src/routes/(main)/_layout/edit/$.tsx New file path-based edit route
packages/viola/src/routeTree.gen.ts Generated routing tree updates for new route structure
packages/viola/src/components/side-menu.tsx Added "Open Print Preview" menu item and updated file navigation links
packages/viola/src/components/panes/preview.tsx Added await for setupPromise before rendering

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

Copilot AI review requested due to automatic review settings December 14, 2025 17:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.


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

@github-actions
Copy link

@spring-raining spring-raining added this pull request to the merge queue Dec 14, 2025
Merged via the queue into main with commit 2af2c4b Dec 14, 2025
6 checks passed
@spring-raining spring-raining deleted the feat/preview-page branch December 14, 2025 17:11
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