Describe the bug
When the AI generates frames, it sometimes uses the element's full visible text as the data-hv-text key (e.g. data-hv-text="决策核心:不是「怎么选」,而是「用什么标准选」"). In the Text Panel, the label (humanizeKey(key)) and the badge (raw key) then both show the exact same long string — which is redundant and makes the panel noisy.
Root cause
humanizeKey() only converts snake_case to Title Case. It has no effect on Chinese or natural-language strings, so label and badge become identical.
The deeper issue is that the key should be a short semantic identifier (e.g. headline, slogan, core_question), not the content itself.
Steps to reproduce
- Create a frame using an AI-generated HTML where text nodes are marked like:
<h1 data-hv-text="决策核心:不是「怎么选」,而是「用什么标准选」">决策核心:...</h1>
- Open the Text Panel for that frame
- Observe: the label and the badge both show the full Chinese sentence
Expected behavior
The data-hv-text attribute should carry a short, descriptive key (headline, core_question, etc.)
Documentation / agent prompt guidance should explicitly state: "the value of data-hv-text must be a short snake_case identifier, not the element's text content"
Optionally, the parser could warn (console) when a key exceeds a reasonable length (e.g. > 40 chars), hinting at misuse
Describe the bug
When the AI generates frames, it sometimes uses the element's full visible text as the data-hv-text key (e.g. data-hv-text="决策核心:不是「怎么选」,而是「用什么标准选」"). In the Text Panel, the label (humanizeKey(key)) and the badge (raw key) then both show the exact same long string — which is redundant and makes the panel noisy.
Root cause
humanizeKey() only converts snake_case to Title Case. It has no effect on Chinese or natural-language strings, so label and badge become identical.
The deeper issue is that the key should be a short semantic identifier (e.g. headline, slogan, core_question), not the content itself.
Steps to reproduce
<h1 data-hv-text="决策核心:不是「怎么选」,而是「用什么标准选」">决策核心:...</h1>Expected behavior
The data-hv-text attribute should carry a short, descriptive key (headline, core_question, etc.)
Documentation / agent prompt guidance should explicitly state: "the value of data-hv-text must be a short snake_case identifier, not the element's text content"
Optionally, the parser could warn (console) when a key exceeds a reasonable length (e.g. > 40 chars), hinting at misuse