91 Commits
Author SHA1 Message Date
Tom Moor 1fa7b5459e chore: Delete nightly Docker tags older than 30 days (#14596) 2026-11-15 11:14:25 -05:00
Tom Moor 0c317222a7 chore: Run non-bottleneck CI jobs on GitHub-hosted runners (#14509) 2026-11-07 06:59:35 -05:00
Tom Moor 9c2595717b chore: Draft GitHub releases from Actions on tag push (#14346) 2026-10-26 17:29:11 -04:00
Tom Moor 333a5924f6 chore: Auto-merge eligible Dependabot updates once CI passes (#14288)
* chore: Auto-merge eligible Dependabot updates once CI passes

* fix: Require a positive major version and turn off stale auto-merge
2026-10-24 10:05:32 -04:00
Tom Moor eb31d80fb8 chore: Validate Crowdin translations and merge them weekly (#14285)
* 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
2026-10-24 08:15:48 -04:00
Tom Moor 4a3cd40a4b chore: Do not fail CI when RelativeCI upload fails (#14245) 2026-10-22 22:31:25 +00:00
Tom Moor 45bf9e290c chore: Pass yarn audit when the audit service is unreachable (#14219) 2026-10-22 03:47:52 +00:00
Tom Moor 2a4693687b chore: Load Vite and Vitest configs as ESM (#14101)
* 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
2026-10-16 01:40:47 +00:00
Tom Moor 8ca53c0c3a ci: Remove Blacksmith sticky disks (#13935)
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.
2026-10-02 09:42:51 -04:00
Tom Moor 97c6339e93 ci: Run a full type-check instead of reusing the incremental cache (#13882)
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.
2026-09-24 21:38:05 -04:00
Tom Moor 014dd04606 fix: Use the supported Node.js range in CI (#13861) 2026-09-23 10:17:20 -04:00
Tom Moor 3a446d1e37 chore: Speed up CI (#13797)
* 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
2026-09-18 17:45:25 -04:00
Tom MoorandClaude Fable 5 b17f2611bf chore: React 18 upgrade (#13559)
* 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>
2026-09-03 01:43:47 -04:00
Tom MoorandClaude Opus 5 17e8174b3f fix: Stale workflow failing on Print outputs step (#13367)
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>
2026-08-10 03:18:28 +00:00
Tom MoorandClaude Opus 5 2a77f76567 ci: Don't block merging on the dependency audit (#13347)
* 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>
2026-08-08 13:01:29 +00:00
Tom Moor b67b7a24a8 Add nightly docker builds (#13223)
* Add nightly docker builds

* Separate environment to ungate nightly builds from manual approval
2026-08-01 11:07:22 -04:00
Tom Moor a6f25dcded chore: Restructure CI required checks (#13219)
* chore: Restructure CI required checks

* Add bundle-size
2026-08-01 11:54:09 +00:00
Tom MoorandClaude 6b60858226 fix: Never downgrade Node.js in update workflow (#13154)
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-27 17:44:32 -04:00
Tom Moor d4349731b8 chore: Update deprecated CodeQL to v3 (#13129) 2026-07-25 10:32:40 -04:00
Tom Moor 0d02a99188 chore: Upgrade GH actions to latest (Node 24) (#12955) 2026-07-10 05:41:59 -04:00
Tom Moor 9faf89e372 chore: Auto-close PRs that edit generated translation files (#12894) 2026-07-05 17:07:07 +02:00
Tom MoorandClaude Opus 4.8 bb6f05de48 ci: fix invalid secrets expression in RelativeCI step condition (#12791)
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>
2026-06-22 21:46:33 -04:00
1bff98f0de ci: run relative-ci agent action only when key secret is present (#12777)
* 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>
2026-06-22 19:34:41 -04:00
Tom Moor ebaaedb10e Update to Node 26 LTS (#12753) 2026-06-21 15:31:00 -04:00
eliottreich cdd08bbf58 ci: pin third-party GitHub Actions to commit SHAs (#12662)
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.
2026-06-12 22:01:26 -04:00
Tom Moor 58f0613b5f Delete .github/workflows/docker-build-check.yml 2026-06-06 09:30:50 -04:00
Tom Moor c2edd41e87 Enable manual runs of 'Publish build' workflow 2026-06-06 09:05:01 -04:00
Tom Moor 62c0f15c06 Switch from ubicloud -> blacksmith (#12606) 2026-06-06 09:02:43 -04:00
Tom MoorandClaude Opus 4.7 091346dfe8 chore: Migrate to vitest (#12272)
* 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>
2026-05-06 21:10:51 -04:00
Tom Moor 0df6c4947a chore(test): Performance (#12267)
* 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
2026-05-05 08:26:55 -04:00
Tom Moor a7c95b8d7e chore(ci): Parallelize jobs and remove serial setup gate (#12265)
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.
2026-05-05 07:50:53 -04:00
Tom Moor dbafd37751 chore: Add manual confirmation before build published (#12223) 2026-04-30 07:15:05 -04:00
Tom Moor 3f07771a7e chore: Improve setup against supply chain attacks (#12170)
* Add npm audit CI
Remove postinstall
Disable postinstall scripts
Increase age gate to 3d

* audit cleanup

* Gate on dep changes
2026-04-26 21:23:26 -04:00
Tom MoorandClaude Opus 4.6 c72346b799 fix: Skip auto-closing PRs with "pinned" label (#11991)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:27:19 +00:00
Tom MoorandClaude Opus 4.6 c3c5f148b7 Add Node LTS auto-update script (#11927)
* 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>
2026-04-01 19:47:40 -04:00
Tom MoorandClaude Opus 4.6 db953c8b2f fix: Update Docker GitHub Actions to support Node.js 24 (#11925)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:22:21 -04:00
c4479e257e chore: upgrade Node.js to 24.14.1 (LTS) (#11918)
* Initial plan

* chore: upgrade Node.js base image from 22.21.0 to 24.14.1 (LTS)

* chore: include node version in node_modules cache keys

* Add canary build for docker changes

* fix: Try docker driver

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2026-04-01 17:47:01 -04:00
Tom Moor 86a106e8e9 perf: Improved vendor chunking (#11518)
* 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
2026-02-22 16:25:00 -05:00
7cbd06541c Upgrade Yarn to 4.11.0 (#10865)
* Initial plan

* Upgrade Yarn to 4.11.0 with node-modules linker and security settings

Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>

* Restore rolldown resolution to package.json resolutions

Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>

* Enable Corepack in CI workflow for Yarn 4.11.0 support

Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>

* test

* module resolution

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-12-25 08:46:08 -05:00
Tom Moor 58ddcd1b1e wip (#10953) 2025-12-18 07:49:04 -05:00
Tom Moor a54e66e19a chore: Test improvements (#10945)
* Lazy queues, correctly closing Redis and server

* feedback

* fix: Tests not correctly split across matrix
2025-12-17 23:15:55 -05:00
Tom Moor b3b4ed1dc0 chore: Prevent calibre image actions repeatedly compressing the same images (#10408) 2025-10-17 23:25:15 -04:00
Tom Moor 1417a4b958 Delete .github/workflows/lint.yml 2025-10-17 23:24:47 -04:00
AnastasiyaHladina 79ea6279d5 chore: update GitHub actions version (#10405)
* chore: update actions/stale version

* chore: update stefanzweifel/git-auto-commit-action version

* chore: update actions/stale action version
2025-10-17 18:09:48 -04:00
AnastasiyaHladina fd7f359489 chore: update actions versions (#10397) 2025-10-16 21:29:19 -04:00
Tom Moor 52d420bd98 chore: Suppress lint warnings in CI (confuses AI) (#10021)
Auto fix where possible in pre-commit hook
2025-08-27 03:03:14 -04:00
Hemachandar f1a5e95f77 chore: Dependabot group for radix-ui (#10001) 2025-08-26 01:41:15 +05:30
codegen-sh[bot]andTom Moor c3f93a3e9d Add relationships API endpoints (#9402)
* 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>
2025-08-10 15:24:01 -04:00
codegen-sh[bot]andTom Moor 8e4dfa65f0 Migrate from ESLint to oxlint for 50x performance improvement (#9682)
* 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>
2025-07-19 15:42:55 -04:00
Tom Moor 0d03a4ac13 chore: Remove redis in CI (#9657) 2025-07-16 21:17:32 -04:00