Commit Graph

12 Commits

Author SHA1 Message Date
William Casarin
efa5b7e32f token_parser: simplify AddColumnRoute serialization
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-04 08:08:08 -08:00
William Casarin
4f89d95aef token_serializer: introduce TokenWriter
This simplifies token serialization

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-04 08:08:08 -08:00
William Casarin
61b3a92792 token_parser: unify parsing and serialization
This reduces the number of things we have to update in our token parser
and serializer. For payloads, we we have to handle the payload cases
different, but we now have a structure that can deal with that
efficiently.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-04 08:08:08 -08:00
William Casarin
005ecd740d Initial token parser combinator
In an attempt to make our deck serializer more localized,
comprehensible, and less error-prone, we introduce a new parser
combinator based around string tokens.

This replaces the Selection-based intermediary types so that we have a
more direct serialization style.
2025-02-04 08:08:08 -08:00
William Casarin
662755550f wip algo timelines
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-04 08:08:08 -08:00
William Casarin
43637f52bb Merge a few fixes from kernel #652,#649
kernelkind (2):
      log nip05 error
      fix persist deck author profile bug
2025-01-20 10:44:30 -08:00
William Casarin
4b542c0a74 switch to TimelineCache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 14:18:59 -08:00
kernelkind
a585704fb6 fix persist deck author profile bug
closes: https://github.com/damus-io/notedeck/issues/651

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-18 16:01:46 -05:00
kernelkind
6645d4880f integrate EditProfileView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-04 13:42:52 -05:00
kernelkind
69a6bf3664 column: add individual column
A column for following a single user

Closes: https://github.com/damus-io/notedeck/pull/583
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-17 09:19:16 -08:00
William Casarin
ec755493d9 Introducing Damus Notedeck: a nostr browser
This splits notedeck into:

- notedeck
- notedeck_chrome
- notedeck_columns

The `notedeck` crate is the library that `notedeck_chrome` and
`notedeck_columns`, use. It contains common functionality related to
notedeck apps such as the NoteCache, ImageCache, etc.

The `notedeck_chrome` crate is the binary and ui chrome. It is
responsible for managing themes, user accounts, signing, data paths,
nostrdb, image caches etc. It will eventually have its own ui which has
yet to be determined.  For now it just manages the browser data, which
is passed to apps via a new struct called `AppContext`.

`notedeck_columns` is our columns app, with less responsibility now that
more things are handled by `notedeck_chrome`

There is still much work left to do before this is a proper browser:

- process isolation
- sandboxing
- etc

This is the beginning of a new era! We're just getting started.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-12 20:08:55 -08:00
William Casarin
74c5f0c748 split notedeck into crates
This splits notedeck into crates, separating the browser chrome and
individual apps:

* notedeck: binary file, browser chrome
* notedeck_columns: our columns app
* enostr: same as before

We still need to do more work to cleanly separate the chrome apis
from the app apis. Soon I will create notedeck-notebook to see what
makes sense to be shared between the apps.

Some obvious ones that come to mind:

1. ImageCache

We will likely want to move this to the notedeck crate, as most apps
will want some kind of image cache. In web browsers, web pages do not
need to worry about this, so we will likely have to do something similar

2. Ndb

Since NdbRef is threadsafe and Ndb is an Arc<NdbRef>, it can be safely
copied to each app. This will simplify things. In the future we might
want to create an abstraction over this? Maybe each app shouldn't have
access to the same database... we assume the data in DBs are all public
anyways, but if we have unwrapped giftwraps that could be a problem.

3. RelayPool / Subscription Manager

The browser should probably maintain these. Then apps can use ken's
high level subscription manager api and not have to worry about
connection pool details

4. Accounts

Accounts and key management should be handled by the chrome. Apps should
only have a simple signer interface.

That's all for now, just something to think about!

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-11 11:24:29 -08:00