Förslag-sidan: typ-knappar i vänsterspalten, alla fynd nyast först
All checks were successful
build-and-push / build (push) Successful in 12s
All checks were successful
build-and-push / build (push) Successful in 12s
Tre knappar (Artister & album / Låtar / Genrer) ersätter batch-listan; huvudspalten visar alla cachade fynd av vald typ i tidsordning med nyast först, grupperade per körning med datum-avdelare. Nytt API GET /api/suggest/items?type=X (plattar batcher med batch-metadata). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01824ZrvG2mDYYrmwqypLNup
This commit is contained in:
@@ -103,6 +103,18 @@ test('run: batch-id räknas upp och latest tar nyaste först', async () => {
|
||||
assert.equal(engine.loadBatches()[0].id, b2.id)
|
||||
})
|
||||
|
||||
test('allItems: plattar batcher nyast först med batch-metadata', async () => {
|
||||
const { engine } = setup()
|
||||
const b1 = await engine.run()
|
||||
const b2 = await engine.run()
|
||||
const all = engine.allItems('mix')
|
||||
assert.equal(all.length, 2)
|
||||
assert.equal(all[0].batchId, b2.id, 'nyaste batchens fynd först')
|
||||
assert.equal(all[1].batchId, b1.id)
|
||||
assert.equal(all[0].batchCreatedAt, b2.createdAt)
|
||||
assert.equal(engine.allItems('tracks').length, 0)
|
||||
})
|
||||
|
||||
test('run: markdown-staket runt JSON hanteras', async () => {
|
||||
const { engine } = setup({
|
||||
geminiResponse: '```json\n[{"type":"artist","name":"Ghost","motivation":"x"}]\n```',
|
||||
|
||||
Reference in New Issue
Block a user