Surface auto-hide misfires proactively (review strip no longer gated on Show-hidden) #199

Merged
bvandeusen merged 1 commits from dev into main 2026-07-07 00:43:45 -04:00
2 changed files with 9 additions and 10 deletions
@@ -1,7 +1,8 @@
<template>
<!-- Shown atop the gallery when "Show hidden" is on: auto-hidden chrome that
ALSO looked like real content, most-concerning first, with keep / un-hide
(#141). Renders nothing when there's nothing to review. -->
<!-- Auto-hidden chrome that ALSO looked like real content surfaced PROACTIVELY
atop the gallery whenever there's something to review (NOT gated on the
Show-hidden toggle, so misfires can't go unnoticed), most-concerning first,
with keep / un-hide (#141). Renders nothing when there's nothing to review. -->
<section v-if="items.length" class="fc-review" aria-label="Hidden images to review">
<div class="fc-review__head">
<v-icon size="18" color="warning">mdi-alert-outline</v-icon>
@@ -43,13 +44,11 @@
</template>
<script setup>
import { ref, watch } from 'vue'
import { onMounted, ref } from 'vue'
import { useApi } from '../../composables/useApi.js'
import { useGalleryStore } from '../../stores/gallery.js'
import { toast } from '../../utils/toast.js'
const api = useApi()
const store = useGalleryStore()
const items = ref([])
const busy = ref([])
@@ -57,7 +56,8 @@ const busy = ref([])
function keyOf(it) { return `${it.image_id}:${it.tag_id}` }
async function load() {
if (!store.filter.include_hidden) { items.value = []; return }
// Fetched unconditionally on mount — the strip prompts for pending misfires
// even when the operator is browsing normally (Show-hidden off).
try {
const body = await api.get('/api/gallery/hidden-review')
items.value = body.items || []
@@ -83,8 +83,7 @@ async function resolve(it, action) {
}
}
// Fetch whenever "Show hidden" flips on (immediate covers a mount already-on).
watch(() => store.filter.include_hidden, load, { immediate: true })
onMounted(load)
</script>
<style scoped>
+1 -1
View File
@@ -13,7 +13,7 @@
<div class="fc-gallery-layout__main">
<PostInfoHeader />
<GalleryFilterBar v-if="store.filter.post_id == null" />
<HiddenReviewStrip />
<HiddenReviewStrip v-if="store.filter.post_id == null" />
<EmptyState v-if="store.isEmpty" />
<GalleryGrid v-else @open="openImage" />
</div>