Brian McGee
41f7ae08a8
feat(ui): enable storybook snapshot tests
...
- adds a process-compose namespace for running `storybook` and `luakit` together to replicate the `webkit`-based rendering that happens inside of `webview`
- adds some helper scripts for running storybook tests and updating snapshots, with documentation in the README.
- adds a `clan-app-ui-storybook` package which builds and tests the storybook, checking for rendering changes
Currently, we’re only doing markup-based snapshot tests. We’re also using headless chromium for the tests by default as I couldn't get webkit to work in the nix build.
As we’re only markup-based for the time being, this should be ok. But eventually I'd like to get it working with webkit.
2025-05-30 11:06:14 +01:00
Brian McGee
717f78b29c
feat(ui): introduces storybook
...
- adds the necessary dependencies and configuration for Storybook.
- refactors the `Button` component and adds some stories for it.
2025-05-26 12:56:51 +01:00
Brian McGee
4bba02afd4
feat(ui): add a clan context provider
...
- introduces a new consolidated store with `localStorage` support
- introduces a top-level `ClanProvider` providing access to `activeClanURI` and `clanURIs`
- redirects to `/welcome` if `activeClanURI` is `undefined`
- consolidates clan meta querying
- centralises the logic for removal of clan uri's which no longer exist
- fixed some miscellaneous missing `await` calls
2025-05-22 13:24:27 +00:00
Qubasa
d42dcb0e2a
clan-cli: Fix ctrl+c cancelling tasks
2025-05-22 15:01:58 +02:00
Brian McGee
8c5a30ff28
fix(ui): hot-reload of clan-cli
2025-05-22 11:47:35 +01:00
DavHau
d833b62614
GUI: add credentials page (vars)
...
add it to machine details
2025-05-21 11:47:04 +00:00
hsjobeki
952ed43de0
Merge pull request 'Update UI to Node 22 and update dependencies' ( #3729 ) from feat/update-ui-dependencies into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3729
2025-05-21 09:03:27 +00:00
Brian McGee
3328d2ca73
feat(ui): upgrade to nodejs_22 and update dependencies
2025-05-20 15:45:17 +01:00
lassulus
1f0c355175
clan-cli: clan_cli.custom_logger -> clan_lib.custom_logger
2025-05-20 15:08:02 +02:00
lassulus
a4895a4d96
clan-cli: clan_cli.async_run -> clan_lib.async_run
2025-05-20 15:05:11 +02:00
hsjobeki
84a5b74a4f
Merge pull request 'Classgen: export field type definitions' ( #3715 ) from hsjobeki/clan-core:inventory-services-1 into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3715
2025-05-20 12:20:07 +00:00
Johannes Kirschbauer
38de1d1022
UI: remove unused inventory.ts file
2025-05-20 13:32:13 +02:00
Brian McGee
f3d2e65ebb
fix(ui): Exectuting typo in toast message
2025-05-20 11:52:34 +01:00
Jörg Thalheim
5d99fb1e47
fix logger no longer applying to clan_lib
...
with moving code to clan_lib we are missing logging for some output. To
fix this we remove the module scoping from the logger and just set one
global logger.
2025-05-20 10:09:20 +02:00
DavHau
6e898a2c10
GUI/vars: refactor vars step
2025-05-20 11:32:32 +07:00
lassulus
cb74273da4
clan-cli: move clan_cli.nix to clan_lib.nix
2025-05-19 18:40:36 +02:00
DavHau
72fa59c9fa
UI: add vars step to installation flow
2025-05-19 19:11:19 +07:00
DavHau
2b4e624ee8
clan-app/devshell: add script to launch qemu VMs for testing
2025-05-19 18:37:09 +07:00
Johannes Kirschbauer
64e3d84cab
Refactor(cli): name set_inv_machine back to set_machine
...
We don't want to leak information about our internals
Such as 'inv' meaning 'inventory' this is not important from the outside
2025-05-16 18:05:07 +02:00
Johannes Kirschbauer
ec22a098e6
Refactor: rename api set_inv_machine parameter to 'machines,update'
2025-05-16 17:57:40 +02:00
Qubasa
2f0114a236
clan-cli: Unify list_machines and use flake caching
2025-05-16 10:47:49 +02:00
Jörg Thalheim
9e8fefc64b
clan-app/devshell: remove duplicate python3
...
we already get python3 from the frontend.
2025-05-15 15:03:35 +02:00
Jörg Thalheim
70409070e6
fix references in reload-python-api script
2025-05-15 15:03:05 +02:00
Jörg Thalheim
a2d86844b8
remove generated files from git.
2025-05-15 14:56:04 +02:00
Jörg Thalheim
f5249a6448
clan-app/README: more robust process-compose command
...
I had port conflicts with tcp, so let's use unix socket by default.
Also added --keep-project to make trouble-shouting easier in case
something is wrong.
2025-05-15 14:56:04 +02:00
Jörg Thalheim
28972a60d1
clan-app/ui: remove unused .envrc
...
this has been merged into clan-app's envrc
2025-05-15 14:56:04 +02:00
Jörg Thalheim
de0f78b0d2
clan-ui: remove intermediate app directory
2025-05-15 14:56:04 +02:00
Jörg Thalheim
3f7894ef03
clan-app: filter out unrelated files from build
...
this should help for faster ci builds.
2025-05-15 14:43:51 +02:00
Jörg Thalheim
3369e56d35
process-compose: simplify environment
...
we already are in the right devshell for clan-app, so we no longer need
direnv exec. Instead of depending on implicit enviroment variables we
can run change the directory based on the git root as this is easier to
read and follow.
2025-05-15 14:43:51 +02:00
Jörg Thalheim
bebab7691f
devshells.clan-app: require less environment variables
...
also sort shellHook by component
2025-05-15 14:43:51 +02:00
Jörg Thalheim
354353f941
rename devshells.ui to clan-app
2025-05-15 14:15:59 +02:00
Jörg Thalheim
57dcd47992
rename ui to clan-app and move clan-app one layer up
2025-05-15 14:15:59 +02:00
Brian McGee
faf8689ab1
feat: group ui related packages under a ui directory
2025-05-15 12:00:24 +01:00
Mic92
f2464af5a5
Merge pull request 'clan-app: set title and icon' ( #3658 ) from clan-app-title into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3658
2025-05-15 10:42:06 +00:00
Jörg Thalheim
30ff0a622a
clan-app: prepare icon support on linux
...
For some reason the icon is not shown when using the gtk backend but at
least the API calls look correct.
2025-05-15 12:36:30 +02:00
Jörg Thalheim
2f2ebdb41f
clan-app: set title
2025-05-15 12:36:24 +02:00
Mic92
f332433d53
Merge pull request 'ui: Remove garbage collection thread' ( #3636 ) from remove-gc into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3636
2025-05-14 10:19:44 +00:00
Jörg Thalheim
c0376e374d
update cli vars on CLAN_CLI_PERF
2025-05-14 12:07:38 +02:00
Jörg Thalheim
b09e61f68d
clan-app: decode function arguments ahead of launching a thread.
...
If something goew wrong here we rather want to crash the app and get bug
reports.
2025-05-14 11:52:55 +02:00
Jörg Thalheim
b491e9cd51
clan-app: don't raise exception when we use ctr-c
2025-05-14 11:41:16 +02:00
Jörg Thalheim
a4057d39ae
api_wrapper: more descriptive parameter names
...
also only decode the op_key once
2025-05-14 11:39:25 +02:00
Jörg Thalheim
2283987bcd
bind_jsonschema_api: reduce method nesting
2025-05-14 11:39:25 +02:00
Jörg Thalheim
bbac947496
make listing/cancelling tasks less nosy in the logs
2025-05-14 10:49:09 +02:00
Jörg Thalheim
80cadf9268
remove thread garbage collection
2025-05-14 10:49:09 +02:00
Brian McGee
a79d907484
fix(ui): high cpu because of spinning garbage collection
2025-05-13 17:06:19 +01:00
Qubasa
804e46b8a6
clan-app: Improved UX of handling toasts
2025-05-12 18:54:53 +02:00
Qubasa
9544a3e522
clan-app: Working cancellable tasks
2025-05-12 17:54:10 +02:00
Qubasa
38ea6515cf
clan-app: Add cancellable tasks
2025-05-12 17:54:10 +02:00
Qubasa
b90812ecce
clan-cli: add test_create in clan_lib test folder
2025-05-05 22:16:02 +02:00
Johannes Kirschbauer
f6628ec1a9
Refactor(clan_lib): move clan_cli.api into clan_lib.api
2025-04-26 19:51:35 +02:00