* chore: Fail CI on translations with broken placeholders or empty values
* Compare placeholder arrays, not joined strings
* chore: Merge the Crowdin translations PR weekly when CI passes
* chore: Load Vite and Vitest configs as ESM
* fix: Resolve _FILE variables in the Vite config environment
* fix: Do not log the secret file path in the Vite config
* fix: Silence the dotenvx injection log
The sticky disks for the Node.js toolcache, yarn cache and node_modules cost more than the install time they save. The install action uses the setup-node yarn cache again.
The sticky-disk node_modules persists the tsc build info, which let the
unused ts-expect-error directives introduced by the @types/react 19.3.0
bump go unreported on main.
* chore: Speed up CI with TypeScript 7 and Blacksmith runners
Upgrade TypeScript to 7.0.2, the native compiler, which cuts a full type
check from ~57s to ~12s locally. Yarn is bumped to 4.18.0 because older
versions fail to apply the builtin compat patch to TypeScript 7.
Fix two type errors the stricter compiler surfaces: the collection drop
target used unrelated item and monitor types, and Store.add relied on the
error type of an abstract construct call to satisfy the generic return.
Move CI jobs to Blacksmith runners, with a fallback to GitHub-hosted
runners for forks.
* chore: Match enterprise CI runner sizes
* chore: Persist node_modules on a sticky disk and use more test workers
* chore: Use the preinstalled PostgreSQL in CI instead of a service container
* chore: Skip the setup-node yarn cache when a sticky disk is mounted
* chore: Persist the Node.js toolcache and run server tests in 6 shards
* chore: Disable the setup-node package manager cache on Blacksmith
* chore: Keep pull requests from forks off Blacksmith runners and sticky disks
* React 18 upgrade
* fix: Force synchronous React rendering in server HTML export
React 18 can defer a legacy ReactDOM.render commit when sync work is
queued, leaving exported component nodes empty. Wrap the render in
flushSync, and flush unmount-scheduled passive effects before global
env cleanup so React never runs without a window.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor: Move server ComponentView to createRoot
ReactDOM.render and unmountComponentAtNode are removed in React 19.
flushSync around root.render keeps the mount synchronous for the
HTML-export path, which reads the DOM immediately after.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Enable CI
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The staled-issues-prs output is a JSON blob that was interpolated
directly into the shell script, where its quotes and parentheses
were parsed as syntax. Pass it through the environment instead.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* ci: Make dependency audit a warning instead of a failure
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* ci: Let audit fail on its own, drop it from the aggregate check
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The secrets context is not available in step-level if conditions, which
made the workflow file invalid. Map the secret to an env var and test
that instead.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* ci: run relative-ci agent action only when key secret is present
* ci: gate RelativeCI step on secret directly, drop redundant env block
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: umbraci <umbraci@qq.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Pins all 12 third-party action references currently on mutable tags
to the commit each tag resolves to, across 4 workflow files, keeping
a # tag comment. Ref-only, no behavior change.
* wip
* Remove obsolete snapshots
* simplify
* chore(test): Convert mocks to TypeScript and tighten fetch mock types
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Remove unneccessary patches
* Migrate to msw instead of custom fetch mock
* Address PR review comments
- Split chained vi.useFakeTimers().setSystemTime() into separate calls.
- Switch test setup to dynamic imports so EventEmitter.defaultMaxListeners
assignment runs before module init (static imports were hoisted above it).
- Drop redundant NODE_ENV guard in monkeyPatchSequelizeErrorsForJest; its
sole caller already gates on env.isTest.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* chore(test): drop no-op per-test Redis flushall
The afterEach created a fresh ioredis-mock client and flushed it, which
doesn't clear state held by clients elsewhere in the test. Removing the
hook saves a few ms across thousands of test cases.
* Cache Jest transform cache
Drop the dedicated setup job that blocked every other job for ~60s,
extract the install steps into a reusable composite action, drop the
unnecessary bundle-size dependency on types, and switch test-server
sharding to Jest's native --shard flag.
* Add Node LTS auto-update script
* fix: Validate LTS version and update CI step name in Node update workflow
Add semver validation for the fetched LTS version to prevent creating
PRs with invalid node versions (e.g. null) if the upstream API changes.
Also update the human-readable step name in ci.yml during major bumps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* perf/improve-vendor-chunking
* Enable bundle-size run on config change
* fix: Modules that should be lazy loaded
* fix: Mermaid in initial chunk
* tsc
* test
* Defer refractor core loading
* test
* test
* remove vendor chunk
* fix: prosemirror dragged into initial chunk
* Migrate Backlink model to generic Relationship model
- Create new Relationship model with type field to support different relationship types
- Add database migration to create relationships table and migrate existing backlinks
- Update Backlink model to delegate to Relationship model for backward compatibility
- Update BacklinksProcessor to use Relationship model with backlink type
- Update API routes to use new Relationship model
- Update test files to use Relationship model
- Maintain backward compatibility through database view and model delegation
Fixes#9366
* Update migration to rename table instead of creating new one
- Rename existing backlinks table to relationships instead of creating new table
- Add type column with default value to existing table
- Update existing rows to have type='backlink'
- Avoid expensive data migration by keeping existing data in place
- Maintain backward compatibility with database view
- Update rollback to reverse table rename and column addition
This approach is much more efficient for large datasets as it avoids copying millions of rows.
* Remove unnecessary UPDATE statement from migration
The UPDATE statement is not needed since defaultValue automatically
applies to existing rows when adding a column with a default value.
Thanks @tommoor for catching this!
* Wrap up migration in transaction
- Wrap all migration operations in a transaction for atomicity
- Add transaction parameter to all queryInterface calls
- Follow the same pattern as other migrations in the codebase
- Ensures all operations succeed or fail together
* Remove Backlink class entirely and use Relationship everywhere
- Delete server/models/Backlink.ts
- Remove Backlink export from server/models/index.ts
- Remove Backlink import and association from Document model
- All functionality now uses Relationship model with RelationshipType.Backlink
- Maintains same API through Relationship model methods
- Cleaner architecture with single relationship model
* Update documents.test.ts to use RelationshipType enum instead of string
- Import RelationshipType from Relationship model
- Replace type: "backlink" with type: RelationshipType.Backlink
- Improves type safety and consistency with enum usage
* Address code review feedback
- Add transaction wrapper to migration down method for safer rollback
- Remove unused findByTypeForUser method from Relationship model
- Method wasn't used and won't work for all relationship types (e.g., user mentions)
- Clean up code structure and improve safety
* Restore imports
* Add relationships API endpoints
- Create relationships API following stars pattern
- Add CRUD operations: create, list, delete
- Include proper validation, authentication, and authorization
- Support filtering by relationship type and document IDs
- Add relationship presenter and policies
- Register routes in main API router
* Remove relationships.create and relationships.delete endpoints
- Keep only relationships.list endpoint as requested
- Remove create and delete schemas from validation
- Update policies to only allow read operations
- Relationships will be managed internally, not via external API
* Add relationships.info endpoint
- Use Document.findByPk for authorization as requested
- Find relationship by ID and verify user has access to related document
- Return relationship details with accessible documents
- Include proper validation schema for UUID parameter
* Update 20250601223331-migrate-backlink-to-relationship.js
* Update Relationship.ts
* wip
* test
* Final tweaks
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* Migrate from ESLint to oxlint
- Upgraded ESLint to v9 and created flat config for migration compatibility
- Used @oxlint/migrate tool to generate .oxlintrc.json configuration
- Installed oxlint v1.7.0 for 50-100x performance improvement
- Updated package.json scripts to use oxlint instead of eslint
- Updated lint-staged configuration for pre-commit hooks
- Configured ignore patterns for migrations, scripts, and build files
- Removed old ESLint dependencies and configuration files
- Maintained equivalent linting behavior with much faster execution
Performance improvement: ~17 seconds → ~350ms (48x faster)
* rules
* --prefer-offline to speed up yarn install
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* Switch from vite to rolldown-vite for improved build performance
- Add vite resolution to npm:rolldown-vite@latest in package.json
- rolldown-vite is a drop-in replacement that uses Rust-based Rolldown bundler
- Expected benefits: 3x-16x faster builds, up to 100x less memory usage
- No configuration changes needed - rolldown-vite maintains full compatibility
* Switch minifier from terser to oxc
- Change minify option from 'terser' to 'oxc' in vite.config.ts
- Remove terserOptions since they're not needed with oxc minifier
- Fix ESLint error by prefixing unused catch variable with underscore
- Oxc is the high-performance Rust-based minifier used by rolldown-vite
- Expected benefits: faster minification with better performance
* Fix TypeScript compatibility issues with rolldown-vite
- Add type assertion for minify: 'oxc' option which is supported by rolldown-vite but not in standard Vite types
- Update comment for webpackStats plugin to reflect rolldown-vite compatibility
- Resolves TypeScript compilation errors in CI
* fix
* pin
* node-20
* Node 22 support
* Use oxc variant of react plugin
* tsc
* fix: Remove node 21 from engines
It has problematic CJS behavior that was fixed in 22
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>