Skip to content

Custom FS UI shows deleted file after create (lsDir not called after delete) #2028

@Jobians

Description

@Jobians

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

In my custom filesystem (Acode.FS.extend), when I delete a file, Acode immediately removes it from the UI without calling lsDir().

However, after that:

If I create a new file, the UI shows both the new file AND the previously deleted file

The deleted file only disappears when I manually trigger or reopen lsDir()

This suggests Acode is updating the UI optimistically on delete instead of refreshing the directory from the filesystem.


🔁 Steps to reproduce

  1. Open custom FS directory (bota://bots/{botId})

  2. Load files via lsDir()

  3. Delete a file using FS delete()

  4. Observe: file disappears from UI (no lsDir() call happens)

  5. Create a new file using FS createFile()

  6. Observe: UI shows:

new file ✔

previously deleted file ❌ (ghost file)

  1. Only fixed after manually triggering lsDir() again

❗ Expected behavior

After delete or create:

Acode should call lsDir() or fully refresh the directory

UI should always reflect actual filesystem state


❌ Actual behavior

delete() removes item from UI without re-reading FS

lsDir() is not called after delete

UI keeps stale directory state in memory

New file creation merges with stale list, causing ghost deleted entries

Environment

nightly

If applicable, add mockups / screenshots regarding your vision

VID_20260412_114747.mp4

If applicable, attach your Acode.log file to this issue.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions