OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

feat(frontend): Improve file based routing

Open amanape opened this issue 1 year ago • 3 comments

End-user friendly description of the problem this fixes or functionality that this introduces

  • introduces some refactors to the app to improve the file-based routing.

  • Removes outdated test files

  • Refresh package-lock

  • [ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below


Give a summary of what the PR does, explaining any non-trivial design decisions Refactors to the routes have also been introduced. Previously, all routes where children of the root.tsx route which contained the default layout (e.g., side navbar). This meant that separate screens (e.g,, a TOS) would also be children of that route and contain the same layout.

To fix this, the root.tsx route is the "root layout" which is just its children, and OpenHands-related routes (e.g., home screen, /app, etc...) are prefixed with _oh (e.g, _oh._index now contains the previous layout root did, _oh.app now contains the content app did, and so on).

You can read more about how the route file naming works here. No changes have been made to the how the user perceives the URL.


Link of any specific issues this addresses

amanape avatar Oct 10 '24 11:10 amanape

CI seems to be failing due to a non-existent issue, is the FE cached somewhere?

amanape avatar Oct 10 '24 11:10 amanape

Terms of service page is now accessible in /tos ONLY when the VITE_APP_MODE environment variable is set to "saas". Otherwise, it is a 404 page.

We may want to consider alternatives to this. How about:

  • instead of 404, a generic message like "Placeholder TOS"
  • or 404 if a particular file isn't there
  • on the website, replace / place a file with the actual TOS of All-Hands AI.

Maybe a static html file or something. It's not like a TOS needs too much dynamism. 😄

WDYT? I don't think the text itself belongs in this repo TBH. Dunno, why would it?

enyst avatar Oct 10 '24 12:10 enyst

Yeah @amanape let's add the TOS to the all-hands.dev marketing site, rather than the OSS project

rbren avatar Oct 10 '24 15:10 rbren