Harden workstation UX and seed placeholder scans after Playwright QA.
CI / backend (push) Failing after 38s
CI / frontend (push) Successful in 9m35s

Fix mobile queue navigation, draft/loading states, and Intake overflow; seed MinIO demo PDFs so document viewing does not 500; add e2e smoke coverage.
This commit is contained in:
2026-10-06 15:07:15 +08:00
parent 7d7332641f
commit 3c7bf5bccb
47 changed files with 1160 additions and 140 deletions
@@ -23,6 +23,38 @@
>
<slot name="rail" />
</aside>
<!-- Below xl the rail is hidden; keep an explicit path back to the queue -->
<div
v-if="queuePath"
class="xl:hidden col-span-full flex flex-wrap items-center gap-3 border-b border-line bg-surface px-3 py-2 sm:px-4"
data-testid="workstation-mobile-nav"
>
<RouterLink
:to="queuePath"
class="inline-flex items-center gap-1.5 text-sm font-medium text-primary-700 hover:text-primary-800 shrink-0"
>
<span aria-hidden="true">←</span>
{{ queueLabel }}
</RouterLink>
<label
v-if="showMobileBatchSwitcher"
class="flex min-w-0 flex-1 items-center gap-2 sm:max-w-xs"
>
<span class="sr-only">Switch batch in queue</span>
<select
class="form-input min-w-0 flex-1 py-1.5 text-sm"
data-testid="workstation-mobile-batch-select"
:value="selectedBatchId"
@change="onMobileBatchChange"
>
<option v-for="item in queueBatches" :key="item.id" :value="item.id">
{{ item.label }}
</option>
</select>
</label>
</div>
<section
class="workstation-scan min-h-0 min-w-0"
data-testid="workstation-scan"
@@ -44,12 +76,50 @@
<script setup lang="ts">
import { computed, useSlots } from 'vue'
import { RouterLink } from 'vue-router'
const props = defineProps<{
/** When false, render full-width queue slot only */
hasBatch: boolean
export type WorkstationQueueBatchOption = {
id: string
label: string
}
const props = withDefaults(
defineProps<{
/** When false, render full-width queue slot only */
hasBatch: boolean
/** Queue list route shown on viewports where the rail is hidden */
queuePath?: string
queueLabel?: string
/** Compact batch switcher below xl when rail is hidden */
queueBatches?: WorkstationQueueBatchOption[]
selectedBatchId?: string
}>(),
{
queuePath: undefined,
queueLabel: 'Back to queue',
queueBatches: () => [],
selectedBatchId: undefined,
},
)
const emit = defineEmits<{
(e: 'select-batch', batchId: string): void
}>()
const slots = useSlots()
const showRail = computed(() => props.hasBatch && !!slots.rail)
const showMobileBatchSwitcher = computed(
() =>
props.hasBatch &&
!!props.selectedBatchId &&
(props.queueBatches?.length ?? 0) > 0,
)
function onMobileBatchChange(event: Event) {
const id = (event.target as HTMLSelectElement).value
if (id && id !== props.selectedBatchId) {
emit('select-batch', id)
}
}
</script>