feat: improve test & bundler (#14434)

#### PR Dependency Tree


* **PR #14434** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced rspack bundler as an alternative to webpack for optimized
builds.

* **Tests & Quality**
* Added comprehensive editor semantic tests covering markdown, hotkeys,
and slash-menu operations.
* Expanded CI cross-browser testing to Chromium, Firefox, and WebKit;
improved shape-rendering tests to account for zoom.

* **Bug Fixes**
  * Corrected CSS overlay styling for development servers.
  * Fixed TypeScript typings for build tooling.

* **Other**
  * Document duplication now produces consistent "(n)" suffixes.
  * French i18n completeness increased to 100%.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-02-14 16:09:09 +08:00
committed by GitHub
parent 3bc28ba78c
commit 2b71b3f345
25 changed files with 1913 additions and 333 deletions
@@ -0,0 +1,8 @@
export const WORKSPACE_ROUTE_PATH = '/workspace/:workspaceId/*';
export const SHARE_ROUTE_PATH = '/share/:workspaceId/:pageId';
export const NOT_FOUND_ROUTE_PATH = '/404';
export const CATCH_ALL_ROUTE_PATH = '*';
export function getWorkspaceDocPath(workspaceId: string, docId: string) {
return `/workspace/${workspaceId}/${docId}`;
}
+14 -5
View File
@@ -10,6 +10,13 @@ import {
import { AffineErrorComponent } from '../components/affine/affine-error-boundary/affine-error-fallback';
import { NavigateContext } from '../components/hooks/use-navigate-helper';
import { RootWrapper } from './pages/root';
import {
CATCH_ALL_ROUTE_PATH,
getWorkspaceDocPath,
NOT_FOUND_ROUTE_PATH,
SHARE_ROUTE_PATH,
WORKSPACE_ROUTE_PATH,
} from './route-paths';
export function RootRouter() {
const navigate = useNavigate();
@@ -38,17 +45,19 @@ export const topLevelRoutes = [
lazy: () => import('./pages/index'),
},
{
path: '/workspace/:workspaceId/*',
path: WORKSPACE_ROUTE_PATH,
lazy: () => import('./pages/workspace/index'),
},
{
path: '/share/:workspaceId/:pageId',
path: SHARE_ROUTE_PATH,
loader: ({ params }) => {
return redirect(`/workspace/${params.workspaceId}/${params.pageId}`);
return redirect(
getWorkspaceDocPath(params.workspaceId ?? '', params.pageId ?? '')
);
},
},
{
path: '/404',
path: NOT_FOUND_ROUTE_PATH,
lazy: () => import('./pages/404'),
},
{
@@ -175,7 +184,7 @@ export const topLevelRoutes = [
lazy: () => import('./pages/open-app'),
},
{
path: '*',
path: CATCH_ALL_ROUTE_PATH,
lazy: () => import('./pages/404'),
},
],