From 0d1b4fee11b86618a04f239eca14240c9082c478 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Tue, 18 Aug 2026 17:32:26 +0300 Subject: [PATCH] fix(chat): give every backend-tagged system event its own timeline chip (#936) System events ride as role=user rows with a display_kind sidecar (backend issues #904/#82888). The full-bleed renderer routes any displayKind != null to a SystemEvent, but timelineMarkerLabelRes only had labels for model_switch / personality_switch / auto_continue / async_delegation_complete. skill_invocation and internal_notification had NO label, so TimelineMarkerChip returned early and they fell through to the bare SystemBubble (centered italic text, no clear system identity) instead of a distinct chip. - Add skill_invocation + internal_notification to timelineMarkerLabelRes. - Add string resources en/zh/ko (ko was missing all timeline markers; added the two new ones for parity). - TimelineMarkerTest: assert both new kinds map to labels. Result: every backend system message type now renders as its own centered timeline chip, never as a user bubble. Legacy sessions persisted before the backend added display_kind tagging still lack the sidecar and would need a one-time backend re-tag to stop rendering as user bubbles. Co-authored-by: M57 --- .../hermescontrol/ui/chat/fullbleed/TimelineMarkerChip.kt | 2 ++ app/src/main/res/values-ko/strings.xml | 2 ++ app/src/main/res/values-zh/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ .../hermescontrol/ui/chat/fullbleed/TimelineMarkerTest.kt | 8 ++++++++ 5 files changed, 16 insertions(+) diff --git a/app/src/main/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerChip.kt b/app/src/main/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerChip.kt index 588dd3bb..44d542e9 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerChip.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerChip.kt @@ -28,6 +28,8 @@ internal fun timelineMarkerLabelRes(kind: String?): Int? = "personality_switch" -> R.string.timeline_marker_personality_switch "auto_continue" -> R.string.timeline_marker_auto_continue "async_delegation_complete" -> R.string.timeline_marker_delegation_complete + "skill_invocation" -> R.string.timeline_marker_skill_invocation + "internal_notification" -> R.string.timeline_marker_internal_notification else -> null } diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index b8ba7493..e7917d67 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -752,4 +752,6 @@ 이미지를 저장할 수 없음 이미지를 불러올 수 없음: %1$s 이미지를 공유할 수 없음 + 스킬 호출됨 + 시스템 알림 \ No newline at end of file diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 3c604ad5..05fa74fa 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -979,6 +979,8 @@ 人格已切换 回合已自动继续 委派任务已完成 + 技能已调用 + 系统通知 你的回复 添加预设 添加参考模型 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4141c873..75a28862 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1102,6 +1102,8 @@ Personality switched Turn auto-continued Delegated task completed + Skill invoked + System notification Your response Add preset Add reference model diff --git a/app/src/test/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerTest.kt b/app/src/test/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerTest.kt index cbe3a915..4b2cf449 100644 --- a/app/src/test/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerTest.kt +++ b/app/src/test/java/com/m57/hermescontrol/ui/chat/fullbleed/TimelineMarkerTest.kt @@ -18,6 +18,14 @@ class TimelineMarkerTest { R.string.timeline_marker_delegation_complete, timelineMarkerLabelRes("async_delegation_complete"), ) + assertEquals( + R.string.timeline_marker_skill_invocation, + timelineMarkerLabelRes("skill_invocation"), + ) + assertEquals( + R.string.timeline_marker_internal_notification, + timelineMarkerLabelRes("internal_notification"), + ) } @Test