Skip to content

Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.

fix(chatbot): name the file in the image card's hover title

tester9909482b52c5
diff --git a/chatbot/src/RichContent.jsx b/chatbot/src/RichContent.jsx
index d969bd2e..d73e8949 100644
--- a/chatbot/src/RichContent.jsx
+++ b/chatbot/src/RichContent.jsx
@@ -456,11 +456,10 @@ export function Attachment({ attachment, sessionId, onOpen }) {
<button
type="button"
className={image ? "message-image" : "attachment-chip"}
+ // The card shows no caption, so the hover title names the file.
title={
image
- ? failed
- ? "单击在产物栏打开"
- : "单击在产物栏打开,双击查看大图"
+ ? `${attachment.name}\n${failed ? "单击在产物栏打开" : "单击在产物栏打开,双击查看大图"}`
: undefined
}
onClick={(e) => {
diff --git a/chatbot/tests/attachment-retry.test.jsx b/chatbot/tests/attachment-retry.test.jsx
index 76fdece6..5b7ab0cf 100644
--- a/chatbot/tests/attachment-retry.test.jsx
+++ b/chatbot/tests/attachment-retry.test.jsx
@@ -59,6 +59,10 @@ describe("message image attachments", () => {
<Attachment attachment={image} sessionId="s1" onOpen={vi.fn()} />,
);
expect(container.querySelector(".image-caption")).toBeNull();
+ // The file name moves to the hover title.
+ expect(container.querySelector(".message-image").getAttribute("title")).toBe(
+ "shot.png\n单击在产物栏打开,双击查看大图",
+ );
// The image itself stays accessible; double-click still opens the viewer.
expect(screen.getByAltText("shot.png")).toBeInTheDocument();
fireEvent.doubleClick(screen.getByAltText("shot.png"));