[clsi] migrate convert project to document to compile from history (#33985)

* [clsi] add request flag for isCompileFromHistory

* [clsi] derive cacheKey for history snapshot from compile dir

* [clsi] migrate convert project to document to compile from history

* [clsi] address review feedback

* [web] determine root doc at the time of converting the project

* [web] wait for flush before starting document conversion

* [saas-e2e] add tests for root doc override when converting project

GitOrigin-RevId: 71c578030949b89f3a74e7f7ab882dfa9c98c17a
This commit is contained in:
Jakob Ackermann
2026-05-28 08:08:06 +00:00
committed by Copybot
parent 666788be70
commit 7e4820f0b0
13 changed files with 215 additions and 68 deletions
@@ -18,7 +18,11 @@ describe('ConversionController', function () {
ctx.documentStat = { size: 5678 }
ctx.Settings = {
enablePandocConversions: true,
path: { compilesDir: '/compiles', outputDir: '/output' },
path: {
compilesDir: '/compiles',
outputDir: '/output',
clsiCacheDir: '/cache',
},
}
ctx.OutputCacheManager = {
CACHE_SUBDIR: 'generated-files',
@@ -43,6 +47,13 @@ describe('ConversionController', function () {
syncResourcesToDisk: sinon.stub().resolves(),
},
}
ctx.HistoryResourceWriter = {
promises: {
syncResourcesToDisk: sinon.stub().resolves(),
},
}
ctx.RequestParser = {
promises: {
parse: sinon.stub().resolves(ctx.parsedRequest),
@@ -87,6 +98,11 @@ describe('ConversionController', function () {
default: ctx.ResourceWriter,
}))
vi.doMock(
'../../../app/js/HistoryResourceWriter',
() => ctx.HistoryResourceWriter
)
vi.doMock('../../../app/js/RequestParser', () => ({
default: ctx.RequestParser,
}))