feat: model name labels, SSE custom event filter, emoji chat titles#8286
feat: model name labels, SSE custom event filter, emoji chat titles#8286FedeCuci wants to merge 2 commits into
Conversation
1. Show model name + provider logo above each assistant response 2. Filter custom SSE event types to fix janhq#8280 (OpenAI-compatible servers) 3. Auto-prefix generated chat titles with a relevant emoji 4. Add emoji font fallback for cross-platform rendering
PR Review: feat: model name labels, SSE custom event filter, emoji chat titlesSummaryThis PR bundles three features in a single commit:
Files changed: 7 (356 additions, 6 deletions) Code Quality & CorrectnessSSE Event Filter ( Emoji in titles ( Emoji font fallback ( Issues FoundBug:
|
|
Addressed the code-level review feedback:
|
There was a problem hiding this comment.
Follow-up review (new commits detected since last review)
Commit 3c4c674 ("fix: address model label PR review feedback") addresses the issues raised in the previous review. Here is what changed:
Previously raised issues -- status
-
useModelProvider.getState()insideuseMemo(anti-pattern) -- Fixed. The follow-up commit subscribes toprovidersreactively viauseModelProvider((state) => state.providers)at the component level and passes it into theuseMemodependency array. The imperativegetState()call is gone. This is the correct approach. -
Dead ternary in
modelProviderForDisplay-- Fixed. The expressionmessageModelProvider ?? (isLastMessage ? undefined : undefined)has been replaced withmessageModelProvider ?? (isLastMessage ? selectedProvider : undefined). The fallback now correctly uses the currentselectedProviderfor the last message during streaming, which means the provider logo renders in the backwards-compatibility case as intended. -
Double
getProviderLogo()call in render path -- Fixed. The logo is now computed once intomodelProviderLogoand reused in both the conditional check and thesrcattribute. -
No tests for model label rendering -- Fixed. Four new test cases were added to
MessageItem.test.tsx:- Renders model name and provider logo from message metadata
- Falls back to raw model ID when the metadata model is unknown
- Falls back to current selection for the last message without metadata
- Does not render a label for a non-last message without metadata
The mock for
useModelProviderwas also updated to includeselectedProviderandprovidersstate, making the test infrastructure match the new component subscriptions.
Remaining observation
- PR bundles 3 independent features -- This was a process suggestion from the previous review. The features (model labels, SSE event filter, emoji titles) remain bundled in one PR. This is not a blocker, just a note for future PRs.
Final state of the code
The MessageItem.tsx model label feature is now clean: reactive state subscriptions, correct fallback logic, no redundant calls, and solid test coverage. The SSE event filter and emoji title features were already in good shape and are unchanged by this commit.
Recommendation: can merge
|
Follow-up review — new commit(s) since last review. Reviewing commit Issues from prior review — resolution status
All four code-level issues have been properly addressed. Review of the fix commitMessageItem.tsx — The component now has three clean Zustand subscriptions ( MessageItem.test.tsx — The four new tests are well-structured and cover the key scenarios. The mock infrastructure correctly simulates the three store selectors. .tsx — The remaining Other PR components (unchanged, already reviewed)
NoteThe PR still bundles three independent features. This remains a process observation, not a blocker. Recommendation: can merge |
Describe Your Changes
Fixes Issues
Self Checklist