summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Create APIs for inviting users.Owen Jacobson2024-10-11
|
* Split the login transaction, to reduce database contention during loginOwen Jacobson2024-10-11
|
* Stop creating accounts during login.Owen Jacobson2024-10-11
|
* Provide a separate "initial setup" endpoint that creates a user.Owen Jacobson2024-10-11
|
* Merge branch 'wip/login-route'Owen Jacobson2024-10-11
|\
| * Move login to its own route.Owen Jacobson2024-10-11
| | | | | | | | This - in passing - fixes the problem where the client failed to subscribe after logging in, by causing the whole subscription process to be re-run when returning to the main interface.
* | Add a `server` header to responses.Owen Jacobson2024-10-11
| |
* | Blind debug output for StoredHash.Owen Jacobson2024-10-11
|/ | | | This is a little excessive, as PasswordHash (which StoredHash converts to) _does_ derive Debug and exposes the hash, but I'll feel better if the hash never ends up in logs.
* Make the identity cookie available to routes outside of `/api/`.Owen Jacobson2024-10-10
| | | | We now (try to) use the identity cookie in `/ch/:channel`. This will not work, because the cookie's path doesn't include `/ch/`.
* Hoist the UI one step up furtherOwen Jacobson2024-10-10
|
* Remove redundancy in `hi-ui` directory name.Owen Jacobson2024-10-10
|
* Fix invalid migration.Owen Jacobson2024-10-10
| | | | | | The original version of this migration happened to work correctly, by accident, for databases with exactly one login. I missed this, and so did Kit, because both of our test databases _actually do_ contain exactly one login, and because I didn't run the tests before committing the migration. The fixed version works correctly for all scenarios I tested (zero, one, and two users, not super thorough). I've added code to patch out the original migration hash in databases that have it; no further corrective work is needed, as if the migration failed, then it got backed out anyways, and if it succeeded, you fell into the "one user" case.
* Return an instance of the client when opening a channel URL directly.Owen Jacobson2024-10-10
|
* Automatically delete database backups if automatic restore is successful.Owen Jacobson2024-10-10
| | | | Operational experience with the server has shown that leaving the backup in place is not helpful. The near-automatic choice is to immediately delete it, and the server won't start until it has been deleted. If the backup restore succeeded, then we know the user has a copy of their database, since the sqlite3 online backups API promises to make the target database bitwise-identical to the source database, so there's little chance the user will need a duplicate.
* Fix tests broken in f624a6a49c7a924cbaae41b3f73ee3fa655c459eOwen Jacobson2024-10-10
|
* Normalize `not found` errors a bit.Owen Jacobson2024-10-09
|
* Align send request fields with message fields by renaming `message` to `body`.Owen Jacobson2024-10-09
|
* Return a flat message list on boot, not nested lists by channel.Owen Jacobson2024-10-09
| | | | This is a bit easier to compute, and sets us up nicely for pulling message boot out of the `/api/boot` response entirely.
* Provide a view of logins to clients.Owen Jacobson2024-10-09
|
* Simplify channel IDs in events. Remove redundant ones.Owen Jacobson2024-10-09
|
* Use a two-tier hierarchy for events.Owen Jacobson2024-10-09
| | | | This will make it much easier to slot in new event types (login events!).
* Flatten nested `channel` and `message` structs in events and API responses.Owen Jacobson2024-10-09
| | | | This structure didn't accomplish anything and made certain refactorings harder.
* Separate `/api/boot` into its own module.Owen Jacobson2024-10-05
|
* Use `/api/boot` to bootstrap the client.Owen Jacobson2024-10-05
| | | | | | | | | | | The client now takes an initial snapshot from the response to `/api/boot`, then picks up the event stream at the immediately-successive event to the moment the snapshot was taken. This commit removes the following unused endpoints: * `/api/channels` (GET) * `/api/channels/:channel/messages` (GET) The information therein is now part of the boot response. We can always add 'em back, but I wanted to clear the deck for designing something more capable, for dealing with client needs.
* Merge branch 'wip/ui'Owen Jacobson2024-10-05
|\
| * Render the UI at /.Owen Jacobson2024-10-05
| |
* | Replace `unsafe` impl of backups with `rusqlite`.Owen Jacobson2024-10-05
| | | | | | | | The unsafe code still exists, but I have more faith in the rusqlite authors than in myself to ensure that the code is correct.
* | Implement `sqlite3_backup_step`'s multi-step protocol.Owen Jacobson2024-10-05
| |
* | Use the right functions for determining error messages.Owen Jacobson2024-10-05
| |
* | Improve ergonomics of `Backup`Owen Jacobson2024-10-05
| |
* | Limit unsafe{} blocks even more tightly.Owen Jacobson2024-10-05
| |
* | Remove an unchecked operation in favour of a panicOwen Jacobson2024-10-05
| |
* | Tighten up `unsafe{}` blocks in backup logic.Owen Jacobson2024-10-05
| |
* | Use sqlx's API, not SQL groveling, to find unwanted migrations.Owen Jacobson2024-10-05
| |
* | Make a backup of the `.hi` database before applying migrations.Owen Jacobson2024-10-05
| | | | | | | | This was motivated by Kit and I both independently discovering that sqlite3 will happily partially apply migrations, leaving the DB in a broken state.
* | Start fresh with database migrations.Owen Jacobson2024-10-04
|/ | | | | | The migration path from the original project inception to now was complicated and buggy, and stranded _both_ Kit and I with broken databases due to oversights and incomplete migrations. We've agreed to start fresh, once. If this is mistakenly started with an original-schema-flavour DB, startup will be aborted.
* Clean up naming and semantics of history accessors.Owen Jacobson2024-10-04
|
* Stray warningsOwen Jacobson2024-10-03
|
* List messages per channel.Owen Jacobson2024-10-03
|
* Add endpoints for deleting channels and messages.Owen Jacobson2024-10-03
| | | | It is deliberate that the expire() functions do not use them. To avoid races, the transactions must be committed before events get sent, in both cases, which makes them structurally pretty different.
* Represent channels and messages using a split "History" and "Snapshot" model.Owen Jacobson2024-10-03
| | | | | | This separates the code that figures out what happened to an entity from the code that represents it to a user, and makes it easier to compute a snapshot at a point in time (for things like bootstrap). It also makes the internal logic a bit easier to follow, since it's easier to tell whether you're working with a point in time or with the whole recorded history. This hefty.
* Package up common event fields as InstantOwen Jacobson2024-10-02
|
* Retire top-level `repo`.Owen Jacobson2024-10-02
| | | | This helped me discover an organizational scheme I like more.
* Split login and token handling.Owen Jacobson2024-10-02
|
* First pass on reorganizing the backend.Owen Jacobson2024-10-02
| | | | This is primarily renames and repackagings.
* Organize IDs into top-level namespaces.Owen Jacobson2024-10-01
| | | | (This is part of a larger reorganization.)
* Provide a resume point to bridge clients from state snapshots to the event ↵Owen Jacobson2024-10-01
| | | | sequence.
* Track event sequences globally, not per channel.Owen Jacobson2024-10-01
| | | | Per-channel event sequences were a cute idea, but it made reasoning about event resumption much, much harder (case in point: recovering the order of events in a partially-ordered collection is quadratic, since it's basically graph sort). The minor overhead of a global sequence number is likely tolerable, and this simplifies both the API and the internals.
* Prevent racing between `limit_stream` and logging out.Owen Jacobson2024-10-01
|
* Reimplement the logout machinery in terms of token IDs, not token secrets.Owen Jacobson2024-09-29
| | | | | | This (a) reduces the amount of passing secrets around that's needed, and (b) allows tests to log out in a more straightforwards manner. Ish. The fixtures are a mess, but so is the nomenclature. Fix the latter and the former will probably follow.