fix: a one-message Discord drop is labelled a Discord message, not a grouping (4390)
CI and images / lint (push) Successful in 4s
CI and images / extension-version (push) Successful in 3s
CI and images / frontend-build (push) Successful in 23s
CI and images / backend-lint-and-test (push) Successful in 31s
CI and images / integration (push) Successful in 2m16s
CI and images / sign-extension (push) Successful in 3s
CI and images / build-agent (push) Successful in 6s
CI and images / build-web (push) Successful in 1m39s
CI and images / smoke-web (push) Successful in 55s
CI and images / promote (push) Skipped
CI and images / lint (push) Successful in 4s
CI and images / extension-version (push) Successful in 3s
CI and images / frontend-build (push) Successful in 23s
CI and images / backend-lint-and-test (push) Successful in 31s
CI and images / integration (push) Successful in 2m16s
CI and images / sign-extension (push) Successful in 3s
CI and images / build-agent (push) Successful in 6s
CI and images / build-web (push) Successful in 1m39s
CI and images / smoke-web (push) Successful in 55s
CI and images / promote (push) Skipped
It stays synthetic, since teaser matching looks only at drops, but the card no longer claims "Grouped from 1 Discord message" / "grouped by FabledCurator" over a single message. The marker chip stays and reads "from Discord". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LVjrnpQjRgHdvq95rASoiR
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
class="fc-post-card__synthetic" :title="synthesisTitle"
|
class="fc-post-card__synthetic" :title="synthesisTitle"
|
||||||
>
|
>
|
||||||
<v-icon icon="mdi-auto-fix" size="x-small" start />
|
<v-icon icon="mdi-auto-fix" size="x-small" start />
|
||||||
grouped by FabledCurator
|
{{ synthesisChip }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
<RouterLink
|
<RouterLink
|
||||||
:to="{ name: 'artist', params: { slug: post.artist.slug } }"
|
:to="{ name: 'artist', params: { slug: post.artist.slug } }"
|
||||||
@@ -270,11 +270,18 @@ const plainTitle = computed(() => toPlainText(props.post.post_title))
|
|||||||
// post dict by hand, must degrade to "not synthetic" rather than throw.
|
// post dict by hand, must degrade to "not synthetic" rather than throw.
|
||||||
const synthesized = computed(() => Boolean(props.post.synthesized_by))
|
const synthesized = computed(() => Boolean(props.post.synthesized_by))
|
||||||
const messageCount = computed(() => props.post.synthesis?.message_count ?? 0)
|
const messageCount = computed(() => props.post.synthesis?.message_count ?? 0)
|
||||||
|
// A drop of one message stays a synthetic post (teaser matching only looks at
|
||||||
|
// drops), but there is nothing grouped in it — #4390: "Grouped from 1 Discord
|
||||||
|
// message" described a wrapper, not a grouping. Say what it is instead.
|
||||||
const synthesisTitle = computed(() => {
|
const synthesisTitle = computed(() => {
|
||||||
const n = messageCount.value
|
const n = messageCount.value
|
||||||
if (!n) return 'Grouped from Discord'
|
if (!n) return 'Grouped from Discord'
|
||||||
return `Grouped from ${n} Discord message${n === 1 ? '' : 's'}`
|
if (n === 1) return 'Discord message'
|
||||||
|
return `Grouped from ${n} Discord messages`
|
||||||
})
|
})
|
||||||
|
const synthesisChip = computed(() =>
|
||||||
|
messageCount.value === 1 ? 'from Discord' : 'grouped by FabledCurator'
|
||||||
|
)
|
||||||
|
|
||||||
const hero = computed(() => images.value[0])
|
const hero = computed(() => images.value[0])
|
||||||
|
|
||||||
|
|||||||
@@ -149,13 +149,16 @@ describe('PostCard', () => {
|
|||||||
expect(w.find('.fc-post-card__assoc').exists()).toBe(false)
|
expect(w.find('.fc-post-card__assoc').exists()).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('singularises a one-message drop', () => {
|
it('does not call a one-message drop a grouping (#4390)', () => {
|
||||||
const w = mountComponent(PostCard, {
|
const w = mountComponent(PostCard, {
|
||||||
props: { post: { ...SYNTH, synthesis: { message_count: 1 } } },
|
props: { post: { ...SYNTH, synthesis: { message_count: 1 } } },
|
||||||
pinia: freshPinia(),
|
pinia: freshPinia(),
|
||||||
})
|
})
|
||||||
expect(w.text()).toContain('Grouped from 1 Discord message')
|
expect(w.text()).toContain('Discord message')
|
||||||
expect(w.text()).not.toContain('1 Discord messages')
|
expect(w.text()).not.toContain('Grouped from')
|
||||||
|
// The marker stays — FC still wrote this post — but names the source.
|
||||||
|
expect(w.find('.fc-post-card__synthetic').text()).toContain('from Discord')
|
||||||
|
expect(w.text()).not.toContain('grouped by FabledCurator')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user