Skip to content

Conversation

@v8vito
Copy link
Member

@v8vito v8vito commented Oct 28, 2025

Breadcrumb trails capture an ordered path through the code. Each crumb stores the target file/range, captured snippet, timestamp, and optional note. Trails live alongside regular notes in memory, load on activation from .security-notes-breadcrumbs.json, and auto-save whenever the store changes or on deactivate. (Paths are stored relative so the data travels cleanly inside the workspace.)

All breadcrumb data is local-only today; remote sync comes later.

Commands Added

  • security-notes.breadcrumbs.createTrail – prompt for a trail name/description and set it active.
  • security-notes.breadcrumbs.selectTrail – quick-pick to switch the active trail.
  • security-notes.breadcrumbs.addCrumb – capture the current editor selection (or line) plus an optional note, append it to the active trail, and push the update through the store so persistence kicks in.
  • security-notes.breadcrumbs.removeCrumb / editCrumbNote – quick-pick helpers for maintenance.
  • security-notes.breadcrumbs.showTrailDiagram – reveals the Breadcrumbs view in the activity bar.
  • security-notes.breadcrumbs.exportTrail – exports the active trail to a Markdown report summarizing every crumb with code fences and metadata.

Webview UI

  • Breadcrumbs appear in their own activity-bar view. The sidebar shows an accordion list of crumbs (“Step N · file:line”) with note previews; expanding a crumb reveals the snippet and lets you click it to jump back into the editor. Header buttons are now “New trail” and “Export”, matching the command set.

Persistence

  • The store serializes trails to .security-notes-breadcrumbs.json (configurable via security-notes.breadcrumbs.localDatabase). On activation we load the file and hydrate the store; every subsequent change triggers an auto-save. When you export, the Markdown file is written wherever you choose, independent of the store.

@v8vito v8vito requested a review from ggabarrin October 28, 2025 15:24
@v8vito v8vito added the enhancement New feature or request label Oct 28, 2025
@v8vito v8vito merged commit 58a5857 into main Oct 30, 2025
@v8vito v8vito deleted the feat-breadcrumbs branch October 30, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants