Conversation
a8880aa to
c44bfed
Compare
|
I am not very excited about vendoring the entirety of the UI code from https://github.com/mishka-group/mishka_chelekom - plus, it makes it hard to review. Why can't we include it as a dependency like we do for the rest of the elixir packages. Finally, more broadly about the proposal to use LiveView itself... Depending on the scope and complexity of this change, I would like to suggest we create a new branch. iFire will complain about having multiple branches, but I won't approve merging this to master while we have two half-complete rewrites. A second branch for liveview is the best we can do until the members of the V-Sekai community can agree on what framework to use for the frontend code. I would be happy to deploy this branch to another subdomain of v-sekai.org Basically, let's try it out in a branch. If this rewrite works well and the overall community prefers LiveView over Next.js, then we can eventually merge it to master. I just don't want to go through the process of pushing unmaintained code to master a second time in one year, so I want to know it will be functional and well-maintained. |
|
@lyuma its the way the mishka component library is distributed. Its for customizability. it generates the components (not technically vendoring) and updates them when the cli is run (via sourcery, so it never breaks components) Idk if we even need Apache attribution in this case as the mishka repo generates these components when run, but it couldn’t hurt. we don’t need to use mishka (daisyui is also fine. Mishka just has built in support for some live_view features, but nothing that can’t be built by hand) and we don’t need to vendor every component all at once. I just did for this PR. that being said, all the mishka components are added in a single commit and they’re all in their own directory, so it shouldn’t add any review burden. Just ignore the mishka files as I’ve made no custom changes to them as far as deployment goes, yes that was my plan. if it seems good, I’ll migrate over more of the pages (there doesn’t seem like too much) then we could decide finally. regardless there are some important configuration and dockerfile updates in this PR (I’ve talked with @dragonhunt02 about a little bit) that I’ll split out into another if we don’t end up wanting to merge all this in. |
|
For context: https://mishka.tools/chelekom/docs
so there’s no production dependencies on mishka either. We don’t distribute any of their code. Just the code their code generates. I have no intention on dying on the mishka hill, so if you really don’t like it, I’ll just use something else. |
How do we implement this? |
|
A quick n dirty way would be to add a multi stage dockerfile to main which would pull down this live view branch, build it, and run it. Add that to the docker compose Then add an entry into the master branch Caddy file to forward requests with the host name beta.v-sekai.org to the new container. |
Docker compose and Caddyfile are used for local development. |
9e6ea74 to
873efa3
Compare
|
We discussed a few things yesterday:
|
… join tables and update to Elixir 1.17 Co-authored-by: Cursor <cursoragent@cursor.com>
…ructure Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This reverts commit 2708003.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Convert project to umbrella with apps/uro_api and apps/uro_web - API app (uro_api): REST endpoint on port 4000, API-only router - Web app (uro_web): Web endpoint on port 4001 with LiveView support - Separate supervision trees for process isolation - Web app depends on API app for accessing contexts via internal calls - Update all configs for both endpoints - Move migrations and seeds to API app - Assets configured for web app only Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove mvstore setup and namespace creation steps - Update test_seeds.exs path to apps/uro_api/priv/repo/test_seeds.exs Co-authored-by: Cursor <cursoragent@cursor.com>
|
- Use Plug.Conn.t() in plug and controller specs (fix unknown_type Conn.t) - Alias Pow.Plug as PowPlug in EnsureUserNotLockedPlug to fix Plug.Conn resolution - Add @dialyzer for open_api_operation/1 in FallbackController and IdentityProofController - Fix File.stream!/3 call in validation (use byte count 4096 as second arg) - Add @SPEC and @dialyzer for generate_file_sha256/1 and Pow Redis all/2 - Add .dialyzer_ignore.exs for Ecto.Multi call_without_opaque - Add dialyxir to root mix.exs with paths and ignore_warnings - .gitignore: apps/*/deps, apps/*/_build, .DS_Store, priv/plts, test_output.txt Co-authored-by: Cursor <cursoragent@cursor.com>
- Adjust indentation for better clarity in to_json_schema function in User module. - Add parentheses for logical conditions in UserController to enhance readability and maintainability.
…nversion Removed root lib/ directory containing duplicate code that was moved to apps/uro_api/lib/uro and apps/uro_web/lib/uro_web during the umbrella conversion. Removed root priv/repo/ directory containing duplicate migrations and seed files that are now in apps/uro_api/priv/repo/. Cleaned up root mix.exs by removing elixirc_paths function and ecto aliases that are no longer needed since the root no longer contains application code. Co-authored-by: Cursor <cursoragent@cursor.com>
…ture Changed all Application.get_env(:uro, ...) calls and otp_app configurations to use :uro_api instead of :uro to match the umbrella application structure. Updated config/config.exs to use :uro_api for stale_shard_cutoff and stale_shard_interval configuration keys. Updated Uro.Repo to use otp_app: :uro_api so Ecto reads repository configuration from the correct application namespace. Updated Uro.Release to use @app :uro_api for release tasks. Updated Uro.Mailer to use otp_app: :uro_api and changed all Application.get_env(:uro, Uro.Mailer) and :frontend_url references to :uro_api. Updated Uro.Gettext and UroWeb.Gettext to use otp_app: :uro_api. Updated Uro.VSekai.ShardJanitor and Uro.Turnstile to read configuration from :uro_api instead of :uro. This fixes the 'application :uro is not available' error when running mix test in the umbrella structure. Co-authored-by: Cursor <cursoragent@cursor.com>
Automate the four QA items from docs/qa-tests.md with API integration tests: - Login on the website (POST /api/v1/login) - Login with the editor (POST /api/v1/session) - Upload avatar (POST /api/v1/dashboard/avatars) - Upload world (POST /api/v1/dashboard/maps) Split tests into separate files under test/qa/: website_login_test.exs, editor_login_test.exs, upload_avatar_test.exs, upload_world_test.exs. Shared setup (test user with upload permissions) lives in test/qa/support/qa_case.ex. Added test fixtures (avatar_data.bin, map_data.bin, preview.jpg) for multipart upload tests. Updated test_helper.exs to start the uro_api application so the router and endpoint are available in tests. Updated docs/qa-tests.md with an Automation section and commands to run all QA tests or individual test files. Added Credo as a dev/test dependency in the root mix.exs so mix credo can be run for static analysis. Co-authored-by: Cursor <cursoragent@cursor.com>
I did prototype split in the uro pr. So I need to decide if we need to proceed with two endpoints or revert to the single endpoint design |
|
Regarding the vendoring problem. All @lyuma asks is we write a file saying which exact command we ran and which git version of mishka was used so we can reproduce it. We don't need to include the generator if we document which git revision we used and some steps. Doesn't even need to be a script. |
Rewriting the frontend in live_view and fixing little things I find along the way.