Skip to content

Bug: reopening a skill expands folders that its bundle tree remembered as collapsed #3755

Closed

Description

@yannickmonney

Bug: reopening a skill expands folders that its bundle tree remembered as collapsed

Suggested severity: P3.

The bundle tree writes the user's collapsed-folder choice to localStorage, then immediately undoes that choice when the editor is reopened. Large bundles reopen with every directory expanded even when the stored state says otherwise.

Reproduction

  1. Open a skill with references/notes.txt and references/nested/inner.txt.
  2. Collapse references/. It becomes aria-expanded=false, and skill-bundle-tree-expanded:<slug> no longer includes references.
  3. Close and reopen the skill.
  4. The same references/ row is expanded again; the stored collapsed choice has not been removed by the user.

Expected: restore the user's existing directory choices. Only directories newly added to the bundle should auto-expand.

Controls: the first open without saved state expands directories as intended; clicking a folder collapses it immediately and records the correct state. The failure occurs on remount with that stored choice present.

Root and acceptance

The hydration effect restores the set and flips hydrated=true. The following effect treats every existing directory absent from the expansion set as a newly created directory and adds it back. Absence actually also means deliberately collapsed.

  • Track which directory paths were previously present independently of which are expanded.
  • Restore saved collapsed states on reopen/refetch, while expanding genuinely new directories.
  • Keep ordinary expand/collapse and nested paths working.

Source:

Deduplication

No matching bundle expansion-state report found. #2381 is table wheel scrolling; #2783 catalog skeletons; #2785 preview typography. Separate from the selected-file Tab-stop defect: this effect can be fixed independently of keyboard focus. Full-body searches covered all 1,065 all-state issues in issues-final.json, the 102 baseline records and the accepted additional-finding ledger. Manual and repository debt registers contain no equivalent accepted gap. See dedup-final.json.

Evidence and limits

Executed editors.probe.test.tsx with vitest.config.ts: six observation/control cases passed. Evidence is retained in component-probe.log and component-observations.json under the global tale-1000-additional/editors-next notes directory. These assertions verify the observed defects and controls; they are not a claim that the product passed these behaviors.

The real skill components, React Query, skill hooks, adapter registry, HTTP client and i18n providers run in jsdom. Read/save cases call the actual existing localhost:3078 app routes, authenticated as the local synthetic audit owner, on a newly created owned skill. The fixture is created by a native skill PUT; text assets are placed only inside that new fixture's bundle. The fetch dispatcher accepts only that skill's detail, assets and write URLs. Explicit faults are 503 reads or a 403 write; all other skill responses come from the native local backend. The session-presence hook, empty team directory and toast sink are mocked. The normal repository jsdom setup mocks layout observers, scrolling, matchMedia and canvas. No browser-layout, mobile, hardware screen-reader, provider, tool execution or production claim is made.

Source is 480ee6a3e6d33c3414a2c0f8a52fded1ddc4ca2d. Compared with fetched main 300bcf076ac9d629518c108c363130fcc733a6b9: the detail, metadata, icon and bundle-tree components are byte-identical. The asset-viewer diff changes gutter/highlight styling, not the read-error branch. No repository source changed.

Replay (from the detached audit worktree's platform directory):

/Users/yannick/.npm/_npx/22f2fe8d8bc13000/node_modules/.bin/bun x vitest run --config /Users/yannick/.codex/notes/tale-1000-additional/editors-next/vitest.config.ts --reporter verbose

The existing synthetic fixture is retained; seed-native.py always creates a new unique skill if a separate replay fixture is needed. No resets are performed.

Independent parent verification

The parent read the implicated source, independently ran the six actual-component/native HTTP observations and controls (6/6 passed), and checked full matched bodies in a fresh 1,065-issue all-state corpus plus the baseline and accepted ledger. Parent evidence: editors-next/parent-replay.log, parent-component-observations.json, and parent-dedup-bodies.md. No hardware screen reader or fresh browser interaction is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions