fix: use --card background for delete modal card (prevent transparency)

This commit is contained in:
Clawdbot 2026-01-28 21:10:50 +01:00
parent 3ab9c58285
commit 324cd328b3
4 changed files with 102 additions and 2 deletions

62
.idea/workspace.xml generated Normal file
View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="8aabfa36-f79a-419b-a800-ad803609afdf" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/src/telegram/bot-message-context.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/telegram/bot-message-context.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 0
}]]></component>
<component name="ProjectId" id="38tIWYARoMdAQ0Uv2tn7ef0s1B6" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "true",
"git-widget-placeholder": "main",
"last_opened_file_path": "/Users/clawdbot/git_repos/moltbot/moltbot",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "pnpm",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-js-predefined-d6986cc7102b-b598e85cdad2-JavaScript-WS-252.25557.126" />
</set>
</attachedChunks>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="8aabfa36-f79a-419b-a800-ad803609afdf" name="Changes" comment="" />
<created>1769612472859</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1769612472859</updated>
<workItem from="1769612474080" duration="4679000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
</project>

View File

@ -43,7 +43,7 @@ index 27dfe62d1..9eb7f2150 100644
+} +}
+ +
+.chat-delete-card { +.chat-delete-card {
+ background: var(--surface); + background: var(--card);
+ border: 1px solid var(--border); + border: 1px solid var(--border);
+ border-radius: 8px; + border-radius: 8px;
+ padding: 20px 24px; + padding: 20px 24px;

View File

@ -0,0 +1,38 @@
import { describe, expect, it } from "vitest";
import { extractThreadIdFromSessionKey } from "./session-key-utils.js";
describe("extractThreadIdFromSessionKey", () => {
it("extracts topic ID from Telegram session key", () => {
expect(extractThreadIdFromSessionKey("agent:main:telegram:group:123:topic:7")).toBe("7");
});
it("extracts thread ID from session key", () => {
expect(extractThreadIdFromSessionKey("agent:main:discord:channel:123:thread:456")).toBe("456");
});
it("returns null for non-topic session keys", () => {
expect(extractThreadIdFromSessionKey("agent:main:telegram:group:123")).toBeNull();
});
it("handles empty input", () => {
expect(extractThreadIdFromSessionKey(null)).toBeNull();
expect(extractThreadIdFromSessionKey(undefined)).toBeNull();
expect(extractThreadIdFromSessionKey("")).toBeNull();
});
it("handles session key without agent prefix", () => {
expect(extractThreadIdFromSessionKey("telegram:group:123:topic:7")).toBe("7");
});
it("extracts last thread/topic marker if multiple present", () => {
expect(extractThreadIdFromSessionKey("agent:main:telegram:topic:1:thread:99")).toBe("99");
});
it("handles whitespace around thread ID", () => {
expect(extractThreadIdFromSessionKey("agent:main:telegram:group:123:topic: 42 ")).toBe("42");
});
it("returns null when thread marker is at the end without ID", () => {
expect(extractThreadIdFromSessionKey("agent:main:telegram:group:123:topic:")).toBeNull();
});
});

View File

@ -1514,7 +1514,7 @@
} }
.chat-delete-card { .chat-delete-card {
background: var(--surface); background: var(--card);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: 8px;
padding: 20px 24px; padding: 20px 24px;