Skip to content

Commit e4f0e89

Browse files
committed
fix(ci): pause search clock without wall-time races
1 parent 85e2fd8 commit e4f0e89

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎apps/sim/app/llms-full.txt/route.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ function isoDate(date: Date): string {
8080
return date.toISOString().slice(0, 10)
8181
}
8282

83-
/** The key facts of one `/comparisons/{id}` page as markdown, from the same profile data. */
8483
function questionMarkdown({ question, answer }: ComparisonQuestion): string {
8584
return `**${question}**\n\n${proseToMarkdown(answer)}`
8685
}
8786

87+
/** The key facts of one `/comparisons/{id}` page as markdown, from the same profile data. */
8888
function comparisonMarkdown(competitor: CompetitorProfile): string {
8989
const verdict = buildBottomLine(competitor)
9090
const questions = getQuestionSectionGroups(competitor)

‎apps/sim/lib/sim-links/application/use-cases.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ export const listSimLinks = defineAuthorizedOrganizationUseCase({
194194
},
195195
})
196196

197-
/**
198-
* One link by id or by name as typed. Hidden exactly as browsing hides it: an unlisted link reads
199-
* as missing to anyone who cannot manage it.
200-
*/
201197
async function findLinkIdByName(organizationId: string, typedName: string) {
202198
const link = await repository.findSimLinkDestination(
203199
organizationId,
@@ -206,6 +202,10 @@ async function findLinkIdByName(organizationId: string, typedName: string) {
206202
return link?.id
207203
}
208204

205+
/**
206+
* One link by id or by name as typed. Hidden exactly as browsing hides it: an unlisted link reads
207+
* as missing to anyone who cannot manage it.
208+
*/
209209
export const getSimLinkView = defineAuthorizedOrganizationUseCase({
210210
operation: simLinkOperations.get,
211211
...rollout,

‎apps/sim/scripts/test-organization-search-e2e.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,9 @@ try {
708708
await navigation.getByRole('button', { name: 'Search', exact: true }).click()
709709
await expect(page).toHaveURL((url) => url.searchParams.get('mode') === 'search')
710710
}
711-
await page.clock.pauseAt(new Date(Date.now() + 100))
711+
const pausedAt = new Date()
712+
await page.clock.setFixedTime(pausedAt)
713+
await page.clock.pauseAt(pausedAt)
712714
const selected = navigation.getByRole('button', {
713715
name: selectedMode === 'assistant' ? 'Assistant' : 'Search',
714716
exact: true,
@@ -726,6 +728,7 @@ try {
726728
} finally {
727729
admission.resolve()
728730
heldAdmission = undefined
731+
await page.clock.setSystemTime(new Date())
729732
await page.clock.resume()
730733
}
731734
}

0 commit comments

Comments
 (0)