Skip to content

parts of thfeat(studio): improve truth files filtering and UI feedback#177

Open
justlovemaki wants to merge 1 commit intoNarcooo:masterfrom
justlovemaki:master
Open

parts of thfeat(studio): improve truth files filtering and UI feedback#177
justlovemaki wants to merge 1 commit intoNarcooo:masterfrom
justlovemaki:master

Conversation

@justlovemaki
Copy link
Copy Markdown

Summary

  • Updated the studio server API to accurately filter story files using the TRUTH_FILES constant.
  • Added explicit loading and error states to the TruthFiles page to improve UI feedback.
  • Fixed an issue where stale content or edit mode would persist when switching between files.

Type of change

  • Bug fix
  • New feature
  • Refactor (no behavior change)
  • Docs / SKILL.md
  • Test
  • Performance

Motivation (optional)

To ensure the Truth Files feature only displays supported markdown/JSON files and provides a smoother user experience with proper loading/error indicators.

Changes

File Change
packages/studio/src/api/server.ts Updated readdir filtering to use TRUTH_FILES constant.
packages/studio/src/pages/TruthFiles.tsx Integrated loading and error from useApi, and added state reset logic in handleSelect.

Test plan

  • pnpm typecheck passes
  • pnpm test passes
  • Manual verification: Verified that only allowed files are listed, loading pulses appear, and edit mode resets correctly on file change.

- Update API to filter story files using TRUTH_FILES constant
- Add loading and error states to the TruthFiles content viewer
- Reset edit mode and prevent stale content display when switching files
Copy link
Copy Markdown
Author

@justlovemaki justlovemaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants