Skip to content

Commit 4a29104

Browse files
committed
Release 1.0.13: improve prompt control tooltips
1 parent 25c9eab commit 4a29104

7 files changed

Lines changed: 57 additions & 21 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pinkcode",
3-
"version": "1.0.12",
3+
"version": "1.0.13",
44
"description": "Desktop mission control for Grok agents.",
55
"type": "module",
66
"keywords": [

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pinkcode"
3-
version = "1.0.12"
3+
version = "1.0.13"
44
description = "Desktop control plane for Grok Build multi-task observability"
55
authors = ["PinkCode"]
66
license = "Apache-2.0"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "PinkCode",
44
"mainBinaryName": "PinkCode",
5-
"version": "1.0.12",
5+
"version": "1.0.13",
66
"identifier": "com.pinkcode.app",
77
"build": {
88
"beforeDevCommand": "npm run dev",

src/components/PromptBar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,10 @@ export function PromptBar({
361361
label="Mode"
362362
value={sessionMode}
363363
displayLabel={modeMeta.label}
364-
title={`${modeMeta.hint} · shift+tab to cycle`}
364+
tooltip={`${modeMeta.hint} · Press Shift+Tab to cycle modes`}
365365
accent={modeMeta.accent}
366366
glyph={modeGlyph(sessionMode)}
367367
options={SESSION_MODE_OPTIONS}
368-
shortcut="shift+tab"
369368
disabled={busy || running || awaiting}
370369
onChange={onSessionModeChange}
371370
/>
@@ -542,7 +541,7 @@ function ReasoningLevelSelector({
542541
label="Level"
543542
value={active.value}
544543
displayLabel={active.label}
545-
title={active.description ?? `Reasoning level: ${active.label}`}
544+
tooltip={active.description ?? `Reasoning level: ${active.label}`}
546545
accent="neutral"
547546
glyph="◈"
548547
options={options.map((option) => ({

src/components/PromptChipSelect.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ interface Props<T extends string> {
1818
label: string;
1919
value: T;
2020
displayLabel: string;
21-
title: string;
21+
tooltip: string;
2222
accent: ChipAccent;
2323
glyph: string;
2424
options: readonly ChipOption<T>[];
25-
/** Shown to the right of the control (e.g. Shift+Tab). */
26-
shortcut?: string;
2725
disabled?: boolean;
2826
onChange: (value: T) => void;
2927
}
@@ -33,18 +31,18 @@ export function PromptChipSelect<T extends string>({
3331
label,
3432
value,
3533
displayLabel,
36-
title,
34+
tooltip,
3735
accent,
3836
glyph,
3937
options,
40-
shortcut,
4138
disabled,
4239
onChange,
4340
}: Props<T>) {
4441
const [open, setOpen] = useState(false);
4542
const [active, setActive] = useState(0);
4643
const rootRef = useRef<HTMLDivElement>(null);
4744
const listId = useId();
45+
const tooltipId = useId();
4846

4947
useEffect(() => {
5048
if (!open) return;
@@ -108,17 +106,18 @@ export function PromptChipSelect<T extends string>({
108106
disabled ? " disabled" : ""
109107
}`}
110108
ref={rootRef}
111-
title={title}
112109
>
113-
<span className="prompt-chip-label">{label}</span>
110+
<span id={tooltipId} className="prompt-chip-tooltip" role="tooltip">
111+
{tooltip}
112+
</span>
114113
<button
115114
type="button"
116115
className="prompt-chip-trigger"
117116
disabled={disabled}
118117
tabIndex={-1}
119-
aria-haspopup="listbox"
120118
aria-expanded={open}
121119
aria-controls={listId}
120+
aria-describedby={tooltipId}
122121
aria-label={`${label}: ${displayLabel}`}
123122
onClick={() => {
124123
if (!disabled) setOpen((o) => !o);
@@ -133,11 +132,6 @@ export function PromptChipSelect<T extends string>({
133132
134133
</span>
135134
</button>
136-
{shortcut ? (
137-
<kbd className="shortcut-hint" aria-hidden>
138-
{shortcut}
139-
</kbd>
140-
) : null}
141135
{open && (
142136
<div
143137
className="prompt-chip-menu"

src/styles/agent.css

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,50 @@ button.user-question-option:hover:not(:disabled),
916916
min-width: 0;
917917
}
918918

919+
/* Prompt control help; hidden while its menu is open. */
920+
921+
.prompt-chip-tooltip {
922+
position: absolute;
923+
left: 0;
924+
bottom: calc(100% + 7px);
925+
z-index: 45;
926+
display: block;
927+
width: max-content;
928+
max-width: min(320px, 70vw);
929+
padding: 5px 8px;
930+
border: 1px solid color-mix(in srgb, var(--title-selected) 35%, var(--border));
931+
border-radius: 6px;
932+
background: color-mix(in srgb, var(--bg-elevated) 98%, transparent);
933+
box-shadow: var(--shadow-md);
934+
color: var(--text);
935+
font-size: 10px;
936+
font-weight: 500;
937+
line-height: 1.35;
938+
white-space: normal;
939+
pointer-events: none;
940+
opacity: 0;
941+
visibility: hidden;
942+
transform: translateY(3px);
943+
transition:
944+
opacity 0.08s ease,
945+
transform 0.08s ease,
946+
visibility 0s linear 0.08s;
947+
}
948+
949+
.prompt-chip.open .prompt-chip-tooltip {
950+
opacity: 0;
951+
visibility: hidden;
952+
transform: translateY(3px);
953+
transition: none;
954+
}
955+
956+
.prompt-chip:not(.open):hover .prompt-chip-tooltip,
957+
.prompt-chip:not(.open):focus-within .prompt-chip-tooltip {
958+
opacity: 1;
959+
visibility: visible;
960+
transform: translateY(0);
961+
transition-delay: 0s;
962+
}
919963
.prompt-chip.accent-plan {
920964
--chip-accent: var(--kind-plan);
921965
--chip-border: color-mix(in srgb, var(--kind-plan) 45%, transparent);
@@ -1033,7 +1077,6 @@ button.user-question-option:hover:not(:disabled),
10331077
transform: translateY(0.5px);
10341078
}
10351079

1036-
/* Shortcut chip styling lives on global `.shortcut-hint` (base.css). */
10371080

10381081
.prompt-chip-menu {
10391082
position: absolute;

0 commit comments

Comments
 (0)