Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
406 changes: 214 additions & 192 deletions remotestate-demo/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion remotestate-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remotestate-demo",
"private": true,
"version": "0.0.0",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion remotestate-py/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 0.2.0 (in development)
## Version 0.2.0

- Tightened the shared path grammar to a strict JSONPath subset without the
`$.` prefix:
Expand Down
42 changes: 21 additions & 21 deletions remotestate-py/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

## New Features

- [x] Allow serving the UI app from the known URL when running the HTTP dev server
serving the Reaact/TypeScript dev app.
- `ui_dist` passed to `serve()` can be a URL.
- Include WebSocket URL as query parameter `ws` in opened IFRAME / browser tab.

- [x] Allow enhancing the FastAPI apps by new (HTTP) routes, e.g., to allow for
adding an extra REST API.

- [ ] We currently require a user's `Service` query and action methods to
accept and return JSON data only. Since we use Pydantic, `pydantic.BaseClass`
arguments and return values should be handled by default. Allow for custom
Expand All @@ -24,10 +16,13 @@
Care: If an action calls actions or queries or a query calls queries the
original method must be called, not the wrapped, reactive version.

## Bugs
- [x] Allow serving the UI app from the known URL when running the HTTP dev server
serving the Reaact/TypeScript dev app.
- `ui_dist` passed to `serve()` can be a URL.
- Include WebSocket URL as query parameter `ws` in opened IFRAME / browser tab.

- [x] If `ui_dist` passed to `serve()` is a URL, the UI won't work although the
correct WebSocket URL is passed as query parameter `ws` in opened IFRAME.
- [x] Allow enhancing the FastAPI apps by new (HTTP) routes, e.g., to allow for
adding an extra REST API.

## Refactorings

Expand All @@ -46,12 +41,17 @@
- [ ] Visit all critical paths: log or raise or both?
- [ ] Include traceback in `ErrorMessage`

## Improve security

- [ ] Configure security checks for `ruff check`

## State equality

- [ ] Only include values in TaskUpdateMessage that changed. Use `==` by default.
Ensure `InvalidatetMessage` is always sent, even if there are no updates.
- [ ] Only include values in `ActionResultMessage` that actually changed.
Use `==` by default. Ensure `"action_result"` message is always sent,
even if there are no updates.
- [ ] Allow passing custom equality checks, register `f(a, b): bool`
using state path as key.
using state path as key.

## State serialization

Expand All @@ -67,10 +67,10 @@
- [ ] Check code for obvious optimization options
- [ ] Check code for potential performance limitation issues
- [ ] Check if we can compress request/response sizes, e.g.,
have a special binary format for (numpy-like) array data
and (pandas-like) data frames.
- [ ] Maybe throttle number emitted TaskUpdateMessage / time
- [ ] Was using WebSockets + JSON the right decision?
have a special binary format for (numpy-like) array data
and (pandas-like) data frames.
- [ ] Maybe throttle number emitted `TaskUpdateMessage` / time
- [ ] Check: was using WebSockets + JSON the right decision?

## CI

Expand All @@ -82,10 +82,10 @@
## Add-on project: TS interface generation

- [ ] A CLI tool to generate a typescript interface and service factory
from a given Python `Service` implementation. The service factory creates
a 1:1 TS version of the Python service.
from a given Python `Service` implementation. The service factory creates
a 1:1 TS version of the Python service.

## Add-on project: UI generation

- [ ] Allow for UI generation from OpenAPI/JSON schema.
FieldFactory interface: Neutral w.r.t. UI lib
FieldFactory interface: Neutral w.r.t. UI lib
2 changes: 1 addition & 1 deletion remotestate-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "remotestate"
version = "0.2.0.dev0"
version = "0.2.0"
authors = [{name = "forman"}]
description = "Python state, React UI."
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion remotestate-ts/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 0.2.0 (in development)
## Version 0.2.0

- Tightened the shared path grammar to a strict JSONPath subset without the
`$.` prefix:
Expand Down
9 changes: 4 additions & 5 deletions remotestate-ts/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

## New Features

- [x] Ease implementing the `RemoteStateClient` interface in general.
See example in `README.md`, which is quite complex.
- [ ] Ease implementing the `RemoteStateClient` interface for zustand-users.
Create a new subpackage `zustand` for this and make zustand a peer dependency.
Create a new subpackage `zustand` for this and make zustand a peer dependency.
- [ ] Make `react` a truly optional submodule.
No longer export it from maon module.
No longer export it from maon module.
- [x] Ease implementing the `RemoteStateClient` interface in general.
See example in `README.md`, which is quite complex.
- [x] Require an explicit WebSocket URL or local fallback client.
- [x] Retry connecting to `WebSocket`, if connection could not be
established yet, or it was lost.
- [ ] Show a connection component "Connecting. Retrying in X seconds...".

## Refactorings

Expand Down
Loading