Skip to content

refactor(web): split containers/components/utils; replace App with container views#2

Open
RelientS wants to merge 3 commits intomainfrom
refractor/frontend
Open

refactor(web): split containers/components/utils; replace App with container views#2
RelientS wants to merge 3 commits intomainfrom
refractor/frontend

Conversation

@RelientS
Copy link
Copy Markdown
Collaborator

This PR refactors the web app into clearer layers and files without changing behavior.

Changes

  • Containers: add PendleView, EthenaView, SenaView to encapsulate page logic
  • Components: extract RowDetails from App (market details + points + AI panel)
  • Utils/Constants: move shared helpers to utils.tsx (JSX-friendly) and constants.ts; export CHAINS, DEFAULT_PAGE_SIZE
  • App: simplify to tab orchestration (Pendle/Ethena/sENA) + footer; uses containers
  • Bugfix: fmtPct NaN check fixed in utils

Notes

  • No functional changes intended; UI/behavior parity maintained.
  • Imports now consume shared helpers via ../utils and ../constants.

Verification

  • Vite dev loads; tabs switch correctly; Pendle expands row with details and points; sENA/Ethena views render and fetch as before.

Follow-ups (optional)

  • Add lightweight unit tests for utility functions.
  • Consider code-splitting per tab for faster initial load if needed.

- openai: read OPENAI_API_KEY from env; offline fallback if missing
- config: switch dev.yaml to {service.name,hertz.port,logger.level}
- docs: README config section clarifies schema and load order
… container views

- add containers: PendleView, EthenaView, SenaView
- extract components/RowDetails from App
- move helpers to utils.tsx (JSX-aware) and constants.ts; export CHAINS/DEFAULT_PAGE_SIZE
- simplify App.tsx to tab orchestration + footer
- fix(utils): fmtPct NaN check bug

No functional changes intended; UI/behavior parity maintained.
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