Skip to content

The preview file list is mostly the agent's own instructions, not what it produced #195

Description

@astetic-dev

What happens

The preview's file dropdown lists every .html/.md file in the working folder (three levels
deep, eighty of them). For an agent that runs a documented work process, most of those files
are the process descriptionCLAUDE.md, rules.md, identity.md, card-types.md,
response-templates.md, scoring-rubric.md. Those are what the agent reads. What you want
to look at is what it just wrote, and that is somewhere in the same list under a name that
looks no different.

Filtering on .html is not the answer: agent output is as often .md as it is .html.

Three smaller things make it worse:

  • The label is the bare file name, so four different acties.md files are four identical rows.
  • Opening a file that is not in the list (clicked in the terminal, outside the folder, deeper
    than three levels) shows that file but leaves the dropdown pointing at something else — the
    selector then names a different file than the page you are reading.
  • Opening the preview on a specific file first renders the newest file in the folder and only
    then the file you asked for, so you read one page you did not ask for.

Fix

Group by when the file was written, which is the one signal that separates output from input
and does not depend on the extension:

  • Since this tab opened — what this run of the agent produced.
  • Earlier today / Older — everything else, newest first, as before.

And:

  • Label rows with the path relative to the working folder plus the time it was written
    (_index/dashboard.html · 22:47), so acties.md in four folders is four distinct rows.
  • Always show what is on screen: a file outside the list is added to the top and selected.
  • list_html returns rel (path relative to the working folder) instead of name.
  • Refresh (↻) re-reads the file you are looking at instead of jumping to the newest one; it
    still picks the newest when nothing is open yet.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions