ReviewOS

also looking at this

loghqorg/loghq

Deploy: uniform auth session model (main → production)

#7
Merged glennmichael123 wants to merge main into production
282 files +3028 -64856

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

tests/fixtures/product-states.test.tsadded+20-0
Changes to tests/fixtures/product-states.test.ts
@@ -0,0 +1,20 @@
1import { describe, expect, test } from 'bun:test'
2
3const NOW = '2026-09-12T12:00:00.000Z'
4const entry = (index: number) => ({ id: `log-${index}`, level: index % 5 === 0 ? 'error' : 'info', message: `Fixture log line ${index}`, traceId: `trace-${Math.ceil(index / 4)}`, timestamp: NOW })
5
6export const productStates = {
7 empty: { now: NOW, status: 'ready', logs: [], matched: 0 },
8 normal: { now: NOW, status: 'ready', logs: [entry(1), entry(2), entry(3)], matched: 3 },
9 loading: { now: NOW, status: 'loading', logs: [], matched: null },
10 failure: { now: NOW, status: 'error', logs: [], error: 'Archive search unavailable' },
11 highVolume: { now: NOW, status: 'ready', logs: Array.from({ length: 500 }, (_, index) => entry(index + 1)), matched: 2_500_000 },
12} as const
13
14describe('deterministic log product states', () => {
15 test('covers every UI state', () => expect(Object.keys(productStates)).toEqual(['empty', 'normal', 'loading', 'failure', 'highVolume']))
16 test('keeps volume fixtures large and reproducible', () => {
17 expect(productStates.highVolume.logs).toHaveLength(500)
18 expect(JSON.stringify(productStates)).toBe(JSON.stringify(productStates))
19 })
20})