Skip to content

refactor: optimize files page structure and preview experience#455

Merged
chenyme merged 1 commit into
devfrom
files
Jul 9, 2026
Merged

refactor: optimize files page structure and preview experience#455
chenyme merged 1 commit into
devfrom
files

Conversation

@chenyme

@chenyme chenyme commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactor the Files page and shared file preview experience with smaller, focused structural cleanup.

This change improves the Files page composition, sidebar behavior, loading states, preview layout, and file viewer consistency without changing API contracts or core business behavior. It also consolidates file preview scaling behavior across PDF, DOCX, sheet, and media previews, removes the old skeleton preview path, and keeps shared preview imports aligned after renaming the dialog module.

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Configuration / deployment
  • Security hardening
  • Other

Affected areas

  • Frontend / UI
  • Backend / API
  • Authentication / authorization
  • Conversations / streaming
  • Files / RAG / extraction
  • Model routing / providers
  • MCP / tools
  • Billing / payments
  • Admin console
  • Deployment / Docker / configuration
  • Documentation

Verification

  • pnpm lint
  • pnpm build

Screenshots, API examples, or logs

Not included. Changes are focused on Files page structure, loading behavior, preview layout, and shared preview component cleanup.

Configuration, migration, and compatibility notes

No configuration, database migration, public URL, CORS, API contract, or Swagger changes.

frontend/shared/components/file-preview/file-preview-dialog.tsx was renamed to preview-dialog.tsx, and existing frontend imports were updated.

Documentation

  • Documentation is not needed for this change.
  • Documentation was updated.
  • Documentation still needs to be updated.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed, including authentication, authorization, provider routing, file processing, billing, and admin APIs where relevant.

Checklist

  • I searched existing issues and pull requests.
  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme chenyme self-assigned this Jul 9, 2026
@chenyme
chenyme merged commit 51e7e2d into dev Jul 9, 2026
10 checks passed
@chenyme
chenyme deleted the files branch July 9, 2026 17:13
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.

1 participant