Commit graph

25 commits

Author SHA1 Message Date
Anish Lakhwara 6ac181fca7 add some notes in the README and flake.nix
A couple hints to remind me what I'm doing
2024-11-15 22:59:00 -08:00
Anish Lakhwara 0ca396148b working nix builds
can compile both the react application statically so it can be served by
nginx
and then builds a docker container with nginx for easy deployment to
something like fly.io
I mean since it's static I could probably host it for free on a website
like netlify or something, but I still wanted a docker container for
now.

Notably I did have to move the generated javascript parser into the
mast-react-vite folder so that `buildNpmPackage` was scoped to the
mast-react-vite folder. I'm not sure how to get it working in a truly
monorepo style build working for it yet, but I'm not exactly inclined to
make it super shiny right now either.
2024-11-15 22:46:53 -08:00
Anish Lakhwara f24e56159a feat: parse multiple commands
basically at MVP now
the react app can now add, complete and reactively filter tasks

The filter command doesn't have a enter action, it should probably do
something. maybe I do need the default to be select, instead of filter,
and filter should _actually filter_.

Syncing is next. I'll need to look at the vcln starter template to
understand how they set up, and then maintain different databases for
each user.

What needs to be done is setting up rooms, and the backend such that
everybody gets their own lil sql database, and the syncer can identify
them. we don't really have any notion of security, which is uhhh, not
great.

After that we can look at some malleable features that lend themself to
discoverability. ideally, I don't need to have a tutorial at all.
reactivity needs to exist for almost every command. I want to save the
command, to a dirty state sql table, and then restore it on load. that
should cause all the elements to re-render the proposed change.

this actually unlocks a thought for me: executing filters, sets them as
a "context". a context makes up a view. reports are literally just
saved contexts then. this allows the tanstack table to handle virtual
ids for us!

Then, for the malleable input, all we need some kind of triple scroll
wheel that can be typed, for each of the three segments. ideally with
desired autocomplete 🤔

i think i'm reimagining the CLI for the web almost!
2024-11-10 18:15:20 -08:00
Anish Lakhwara 791cd547ae feat: new command parser
It's not fully hooked up to the react app, and it's not quite complete
either, but it's a start.
Currently, it will parse filter implicitly, and there's also the done
and add command. For now, all commands must place the command name in
the right location.

Additionally, I've hooked up the react table's selection state to the
command parser. Filter based on _ids_ explicitly does work. Manually
selecting an ID will also place it in the input field for
discoverability. It does not remove ids that were manually deselected
yet, nor does filter based on any other attribute work.

The command parser also parses times, but it does so very poorly
currently. More work will need to go into that, for now it's basically a
stub. I'll also need to convert the parser to Go.

The react table conviently handles virtual tables based on it's internal
`row.id`. I'm still wondering how to implement virtual ids, but at least
on the web app, they are constantly updated since the view is always
visible, which is different to the CLI (though perhaps the same as a
                                               TUI?)

Notably, there's no semantics for the difference between selection and
filtering. I think perhaps the implicit filter command should default to
selection, but the explicit filter command should be handled
differently, and actually execute filtering. I haven't yet looked into
how the TanStack Table handles filtering, but I am aware that it does.

I think for an MVP, once done is implemented, I can deploy this, the web
socket server, and try and start using it.
2024-11-10 02:15:10 -08:00
Anish Lakhwara 73e41285a2 make it look nicer 2024-11-06 23:11:46 -08:00
Anish Lakhwara 55b73f8be4 now it looks reasonable, and I think I understand what I was doing wrong
I needed a main element, that was using tailwind classes, so that
everything inside that class, followed the same structure
2024-11-06 22:34:15 -08:00
Anish Lakhwara 26ef0c76ac a little nicer looking, but i still don't really understand where to set
colors...

I stole a bunch of things from
[this](https://github.com/danielagg/shadcn-data-table-resize-columns)
repository I found online, and that seems to have helped.

I'm still having trouble with colors and tailwind and shadcn...
The buttons also only misalign on firefox, not chrome...
2024-11-06 22:21:58 -08:00
Anish Lakhwara d04497f24d init mast-react 2024-11-02 17:29:52 -07:00
Anish Lakhwara 417a16cc74 allow localhost across vpn 2024-10-26 00:06:55 -07:00
Anish Lakhwara 47bde257e4 Merge branch 'main' of git.sealight.xyz:aynish/mast 2024-10-26 00:00:46 -07:00
Anish Lakhwara f7b2d09c4b init react 2024-10-26 00:00:30 -07:00
Anish Lakhwara d484329c5b web: use parser in web 2024-10-21 21:14:51 -07:00
Anish Lakhwara efecf5b4de add peggy as js dependency 2024-09-18 18:48:47 -07:00
Anish Lakhwara 708893e566 move migrations 2024-09-18 18:47:29 -07:00
Anish Lakhwara 626379b804 remove main? 2024-09-18 18:47:13 -07:00
Anish Lakhwara b2a51d74a8 move envrc to .envrc 2024-09-18 18:43:49 -07:00
Anish Lakhwara e6fb263606 js add parser 2024-09-18 18:43:28 -07:00
Anish Lakhwara cedc5db744 darwin shell 2024-09-18 18:43:08 -07:00
Anish Lakhwara 07efb8c48c update archi 2024-08-31 23:04:05 -07:00
Anish Lakhwara fe4e9ea984 add image 2024-08-31 23:02:28 -07:00
Anish Lakhwara ab77ab144c readme 2024-08-31 23:00:51 -07:00
aynish b0ec8fefa3 init: working task add parser for go (#5)
Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
Reviewed-on: #5
2024-08-31 23:00:05 -07:00
aynish 176a81cc91 misc (#4)
Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
Reviewed-on: #4
2024-08-31 18:12:03 -07:00
aynish d46d67830a Sync implementation using cr-sqlite + websockets, across JS and CLI clients (#1)
- Implements CRDT syncing using cr-slqlite.
- Initializes a simple vite application from the cr-sqlite repos that uses Svelte
- implements a websocket go server backend for communicating syncs between applications

Needs lots of refactoring, everything is hardcoded

Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
Reviewed-on: #1
2024-08-31 18:06:10 -07:00
Anish Lakhwara 5ca28cfb19 init
;10u
2024-08-03 18:06:43 -07:00