Skip to content

feat(web): Index tab mid-priority follow-ups (each ships as its own PR) #582

@memtomem

Description

@memtomem

Why

PR #575 follow-up review surfaced eight Index-tab improvements that are each non-trivial enough to ship as their own PR — each carries a small policy, verification, or design decision that doesn't fit the static-disclosure bundle (#5.1a) or the namespace cluster (#5.NS). This issue is an umbrella for tracking them; individual PRs should reference back here when they land.

Tasks

4.2 — force re-index metadata cascade

  • (Spike) Determine the intent of force=True's metadata cascade.
    • Inspect indexing/engine.py: IndexEngine.index_file() force branch (~656). Run git blame and walk back through related PRs / commits.
    • delete_by_source(file_path) followed by re-embedding currently resets access_count, importance_score, and created_at. Decide which case applies:
      • Case 1 (intentional) — design contract is "fresh start, including metadata"
      • Case 2 (accidental) — metadata cascade is incidental coupling, should be preserved
      • Case 3 (undefined) — never decided, undocumented
  • (Implementation, branches on the spike result)
    • Case 1 → tooltip on the force re-index checkbox: "Existing chunks plus access/importance metadata will be regenerated."
    • Case 2 → code change: preserve metadata by default, add an explicit --reset-metadata opt-in. Plus the tooltip.
    • Case 3 → ADR or docstring on force documenting the chosen contract, then either case 1 or case 2 flow.

4.10a — Surface the Search NS filter dropdown in prod

  • Remove the STATE.uiMode !== 'dev' early return in loadNamespaceDropdowns() (web/static/settings-namespaces.js ~59).
  • Backend /api/namespaces already has no dev gating (web/routes/namespaces.py) — frontend-only change, ~1 line.
  • (Note: NS CRUD — color/description/rules editing — stays dev-only and is tracked separately as 4.10b in the ADR track.)

4.11 — Indexing in-flight visibility + double-click guard

  • External indicator — spinner next to the header chips, or a dot on the 폴더 인덱싱 toggle button when an index is running. Avoids "where did my index go?" when the user switches mode mid-run.
  • Double-click guard — while in-flight, the Index button should be disabled (verify current btnLoading behavior first); a second click should show a toast "Already in progress" instead of resetting the status panel of the first click.
  • Pre-work: confirm whether btnLoading already disables; if so this is just a status-reset guard.

4.12 — Folder mode directory picker

  • Add a 📁 Browse button beside the path text input. Keep the text input free-form (current behavior).
  • New GET /api/fs/list?path=... endpoint returning subdirs.
  • Picker UI starts from an allow-list (memory_dirs + ~) with breadcrumb navigation. To go outside the allow-list, the user closes the picker and types the path explicitly.
  • Decision baked in: the allow-list is a discoverability boundary, not a security boundary. Trust model stays "local user only"; the split between text (free) and picker (allow-listed) reflects different UX paths, not different risk policies.

Prev #1 — Collapse the two index buttons

  • Decide between (a) always show progress, drop the "Index" button entirely, or (b) keep one Index button + a small "Show progress" toggle.
  • Current state: side-by-side 인덱스 (primary) + 진행률 표시 인덱스 (ghost) buttons make users guess which to pick. The two-button shape dilutes the form's primary action.

Prev #2 — Upload dropzone proportions

  • Drop zone currently spans the full card width and ~240px tall — disproportionate when the inner content is one icon and two lines. Options: max-width: 480-560px centered, or a left/right split (drop zone on the left, file list on the right).

Prev #4 — Visual hierarchy between main tab nav and mode toggle

  • Both rows render their active state as a blue outline today, so the main vs. sub tablist hierarchy is weak. Suggested: keep the outline for main tabs, switch the mode toggle's active state to a bottom-border style (sub-tab convention). Or add a subtle background to the mode-toggle row to push it visually further from the main nav.

Decisions already made (linked above)

  • 4.10a: backend /api/namespaces is not dev-gated; the change is frontend-only (verified).
  • 4.12: allow-list is a discoverability boundary, not a security boundary. Text input stays free-form.
  • 4.2: requires the spike before implementation; the spike outcome determines whether this is a doc fix, a code fix, or an ADR.

References

All paths under packages/memtomem/src/memtomem/.

  • IndexEngine force path: indexing/engine.py: IndexEngine.index_file() force branch (~656)
  • Storage delete by source: indexing/engine.py: IndexEngine._storage.delete_by_source()
  • Namespace dropdown loader: web/static/settings-namespaces.js: loadNamespaceDropdowns() (~59)
  • Namespaces endpoint: web/routes/namespaces.py: list_namespaces()
  • Index button + handler: web/static/index.html folder panel; web/static/app.js: index-btn listener (~2950)
  • Upload dropzone markup: web/static/index.html upload panel
  • Mode toggle CSS: web/static/style.css (.index-mode-toggle)

Out of scope

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions