fix(client): address trajectory review findings

This commit is contained in:
_Kerman
2026-07-28 15:07:44 +08:00
parent 64b9535c31
commit 9096dbb29d
9 changed files with 244 additions and 60 deletions

View File

@@ -289,6 +289,7 @@ function JsonTreeNode({
/>
<NodeField field={field} expandable onToggle={toggle} />
<span className={css.preview}>{previewValue(value, 0)}</span>
{!lastElement && <span className={css.punctuation}>,</span>}
{expanded && (
<ul id={contentsId} role="group" className={css.children}>
{entries.map(([key, item], index) => (
@@ -524,7 +525,7 @@ export function JsonTree({
field={key}
value={value}
path={[Array.isArray(data) ? index : key]}
lastElement
lastElement={index === rootEntries.length - 1}
initialExpanded={false}
tabStopId={tabStopId}
onClaimTabStop={setTabStopId}