Commits
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
multiple `defer rows.Close()` call in same scope can be dangerous as
underlying value will change.
avoid that by splitting reverse-mapping queries into scoped blocks.
Signed-off-by: Seongmin Lee <git@boltless.me>
This can catch `pages.Notice` responses which is not a successful
request. We refresh the page on successful case, so it's fine to not
refresh the form.
Signed-off-by: Seongmin Lee <git@boltless.me>
Introduce aturi->url maker in `pages.Pages`. This can be used throughout
the codebase later.
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: eti <eti@eti.tf>
- use an `<input>` instead of a `<button>`
- add support for `?q=%s` in `repo/search`
- show empty state message with query examples
- consistent `search-code` icon accross `repo/search` and `repo`
overview to distinguish from global search
resolves
[TAN-534](https://linear.app/tangled/issue/TAN-534/reposearch-nitpicks-and-reworks)
Signed-off-by: eti <eti@eti.tf>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: oppiliappan <me@oppi.li>
in the homepage, we embed videos from bsky posts, this is used
exclusively by that one part of the site
Signed-off-by: oppiliappan <me@oppi.li>
in the homepage, we have a list of bsky posts from the tangled-org
account. some of these posts are reposts. reposts need to be attributed
to the original authors and links now point back to the original
authors' post (instead of being broken).
Signed-off-by: oppiliappan <me@oppi.li>
Lewis: May this revision serve well! <lewis@tangled.org>
After refactoring record deletion logic, we only need
`db.GetReactionStatus`
Signed-off-by: Seongmin Lee <git@boltless.me>
- upsert public key to handle record update event
- don't delete by pair of name and key. delete by name or rkey instead.
Signed-off-by: Seongmin Lee <git@boltless.me>
Most service flow will be:
1. start db transaction
2. run db operation
3. run PDS operation
4. rollback db if anything above failed
5. commit transaction
If PDS operation succeed, don't try rollback anymore. The ingester will
backfill the missed db operations.
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
migrate tables: `stars`, `reactions`, `follows`, `public_keys`
Two major changes:
1. Remove autoincrement id for these tables.
AUTOINCREMENT primary key does not help much for these tables and only
introduces slice performance overhead. Use default `rowid` with
non-autoincrement integer instead.
2. Remove unique constraints other than `(did, rkey)`
We cannot block users creating non-unique atproto records. Appview needs
to handle those properly. For example, if user unstar a repo, appview
should delete all existing star records pointing to that repo.
To allow this, remove all constraints other than `(did, rkey)`.
Minor changes done while migrating tables:
- rename `thread_at` in `reactions` to `subject_at` to match with other
tables
- follow common column names like `did` and `created`
- allow self-follow (similar reason to 2nd major change. we should block
it from service layer instead)
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
- RBAC should be enforced on service logic.
- We should not check for referenced records existence from db due to
the nature of atproto.
- Comment depth validation is not necessary. We can accept them and just
don't render replies with deeper depth.
Move markdown sanitizer to dedicated package to avoid import cycle
Signed-off-by: Seongmin Lee <git@boltless.me>
This fork version uses RepoDescription.URL instead of .Name as
repository identifier
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
THIS IS BAD DESIGN.
A. Indexer should directly subscribe to Knot event stream. Push-to-index
is only for admin use and some edge cases.
B. Index should be triggered just after the refUpdate event and not
after the full git mirror resync is done.
We are doing this because we don't have unified knotstream with basic
repository state (ref list) passed as event payload. Should be updated
later.
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

resolves
[TAN-456](https://linear.app/tangled/issue/TAN-456/in-diff-view-add-open-full-file-button)
Signed-off-by: eti <eti@eti.tf>
resolves
[TAN-523](https://linear.app/tangled/issue/TAN-523/inline-search-fixes)
Signed-off-by: eti <eti@eti.tf>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: dawn <dawn@tangled.org>
Signed-off-by: dawn <dawn@tangled.org>
Signed-off-by: dawn <dawn@tangled.org>
Signed-off-by: dawn <dawn@tangled.org>

resolves
[TAN-525](https://linear.app/tangled/issue/TAN-525/improve-login-flow-success-message)
Signed-off-by: eti <eti@eti.tf>
Signed-off-by: Seongmin Lee <git@boltless.me>
use docker compose up --profile linux
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Will <did:plc:dadhhalkfcq3gucaq25hjqon>
Signed-off-by: Seongmin Lee <git@boltless.me>
- use an `<input>` instead of a `<button>`
- add support for `?q=%s` in `repo/search`
- show empty state message with query examples
- consistent `search-code` icon accross `repo/search` and `repo`
overview to distinguish from global search
resolves
[TAN-534](https://linear.app/tangled/issue/TAN-534/reposearch-nitpicks-and-reworks)
Signed-off-by: eti <eti@eti.tf>
migrate tables: `stars`, `reactions`, `follows`, `public_keys`
Two major changes:
1. Remove autoincrement id for these tables.
AUTOINCREMENT primary key does not help much for these tables and only
introduces slice performance overhead. Use default `rowid` with
non-autoincrement integer instead.
2. Remove unique constraints other than `(did, rkey)`
We cannot block users creating non-unique atproto records. Appview needs
to handle those properly. For example, if user unstar a repo, appview
should delete all existing star records pointing to that repo.
To allow this, remove all constraints other than `(did, rkey)`.
Minor changes done while migrating tables:
- rename `thread_at` in `reactions` to `subject_at` to match with other
tables
- follow common column names like `did` and `created`
- allow self-follow (similar reason to 2nd major change. we should block
it from service layer instead)
Signed-off-by: Seongmin Lee <git@boltless.me>
- RBAC should be enforced on service logic.
- We should not check for referenced records existence from db due to
the nature of atproto.
- Comment depth validation is not necessary. We can accept them and just
don't render replies with deeper depth.
Move markdown sanitizer to dedicated package to avoid import cycle
Signed-off-by: Seongmin Lee <git@boltless.me>
THIS IS BAD DESIGN.
A. Indexer should directly subscribe to Knot event stream. Push-to-index
is only for admin use and some edge cases.
B. Index should be triggered just after the refUpdate event and not
after the full git mirror resync is done.
We are doing this because we don't have unified knotstream with basic
repository state (ref list) passed as event payload. Should be updated
later.
Signed-off-by: Seongmin Lee <git@boltless.me>