commits
Signed-off-by: Seongmin Lee <git@boltless.me>
`sh.tangled.pipeline` events are now completely generated & streamed
from spindle
Signed-off-by: Seongmin Lee <git@boltless.me>
spindle will emit `sh.tangled.pipeline` event on:
- `sh.tangled.git.refUpdate` events from knot stream
- live create/update events of `sh.tangled.repo.pull` records
Signed-off-by: Seongmin Lee <git@boltless.me>
Spindle will sync git repo when new repo is registered
Spindle will listen to `sh.tangled.git.refUpdate` event from knot
stream and sync its local git repo instead. Spindle's git repo will
sparse-checkout only `/.tangled/workflows` directory.
Spindle now requires git version >=2.49 for `--revision` flag in `git
clone` command.
References:
- <https://stackoverflow.com/q/47541033/13150270>
- <https://stackoverflow.com/q/600079/13150270>
Signed-off-by: Seongmin Lee <git@boltless.me>
This single persistent directory can be used for storing general spindle
data like db, motd file and upcoming sparse-clone git repos.
db path will be `${DATA_DIR}/spindle.db`
Signed-off-by: Seongmin Lee <git@boltless.me>
spindle-tap will collect/stream record events from:
- users dynamically added by spindle (spindle members | collaborators of
repos using spindle)
- any users with `sh.tangled.repo.pull` collection
It might be bit inefficient considering it will also stream repo
creation events from PR authors due to second rule, but at least we now
have backfill logic and Sync 1.1 based syncing.
This inefficiency can be fixed later by modifying upstream tap cli or
embedding tap into spindle.
```
+--------- all tangled users --------+
| |
| +-- users known to spindle-tap --+ |
| | (PR author / manually added) | |
| | | |
| | +----------------------------+ | |
| | | users known to spindle | | |
| | | (members / collaborators) | | |
| | +----------------------------+ | |
| +--------------------------------+ |
+------------------------------------+
```
Close: <https://tangled.org/tangled.org/core/issues/341>
Signed-off-by: Seongmin Lee <git@boltless.me>
This new db migration won't migrate existing records in repos table.
Instead, it will simply rename the legacy table to `repos_old` and
create a new one with same name.
repo backfill will be done with tap
Signed-off-by: Seongmin Lee <git@boltless.me>
create new one if it's missing
Signed-off-by: Seongmin Lee <git@boltless.me>
This commit includes bare minimum tap client to use tap from spindle.
Signed-off-by: Seongmin Lee <git@boltless.me>
This commit won't work without following spindle rewrite to use tap and
introduce backfill because repos table is empty yet.
Signed-off-by: Seongmin Lee <git@boltless.me>
1. Use repo AT-URI as identifier.
2. Use `dom` field rather than `obj` to filter by repository. So now
it's "user with role A in repo B can do action D to field C" where
`A,B,C,D` are `sub,dom,obj,act`.
3. Manage app-logic rules in embedded csv file which won't be saved in
db and load to memory on start. This makes app's global rbac rule
change easier as we just need to edit the csv file.
Many permission check methods are missing, but should be enough to test
this new RBAC enforcer package in spindle.
Related issue: <https://tangled.org/tangled.org/core/issues/282>
Signed-off-by: Seongmin Lee <git@boltless.me>
- did-method-plc
- bluesky-jetstream
- bluesky-relay
- tap
Signed-off-by: Seongmin Lee <git@boltless.me>
the new 3-panel layout puts the diff upfront, and the review panel off
to the right. on mobile devices, the review panel is a collapsible
bottom-sheet, and on desktop, it is a collapsible side-panel. it is now
possible to comment on a PR while viewing its diff.
all the JS on the page is entirely optional and simply added for
quality-of-life (such as auto-collapsing the bottomsheet on mobile
etc.).
in the review panel, submissions are listed with a top-level entry, and
comments on each submission are "reply" entries. the top-level
submission header includes the following information:
- commit messages and bodies (if available, on patch PRs this is
omitted)
- pipeline status (if avaiable, only for PRs that have triggered CI)
- mergability (if available, this is calculated only for the
latest submission)
the actual merge status (merged/closed/deleted) of the PR is listed
above the pull-action bar. previous designs combined the mergability
check and the merge-status into one component.
Signed-off-by: oppiliappan <me@oppi.li>
all 3 pages are presented in one page now.
Signed-off-by: oppiliappan <me@oppi.li>
the component is almost identical to the new-comment component on issues
now.
the loader icon now replaces the existing button icon when a request is
inflight. this is much cleverer because it avoids the increase in button
width when a request is inflight.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
also removes unused functions such as filetree.
any object that adheres to the DiffRenderer interface can now be
presented as html using the repo/fragments/diff template.
types.NiceDiff and patchutil.Interdiff now implement the new interface.
this allows us to remove the differing rendering logic necessary to
present each kind of diff.
any {split,unified} {diff,interdiff} can be rendered by adhering to this
interface.
move most of the logic from the html template into golang. this is just
much more predictable. also add a short and long form summary.
reduces the left margin by placing profile pictures halfway over the
vertical line. this mimics gh discussions design.
the layered button is too heavy to use on already layered elements such
as cards. this is also against the material design principles.
we should ideally templatize this a bit more
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Add offset-based pagination to the pulls page, matching the issues behavior
Signed-off-by: moshyfawn <email@moshyfawn.dev>
Signed-off-by: Seongmin Lee <git@boltless.me>
Extract pagination UI into a shared template for reuse across pages. Refactored issues listing to use it with no behavior change
Signed-off-by: moshyfawn <email@moshyfawn.dev>
Signed-off-by: Seongmin Lee <git@boltless.me>
prepare for PR page pagination
Signed-off-by: Seongmin Lee <git@boltless.me>
Wrap participant avatars with profile links. Make DID-type labels fully clickable chips linking to user profiles, matching the commit hash chip pattern
Signed-off-by: moshyfawn <email@moshyfawn.dev>
Signed-off-by: Seongmin Lee <git@boltless.me>
avoid using `.Knot` and `.Rkey` directly
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
rkey itself isn't unique across the network because multiple different
knots can emit same rkey. We should use full at-uri here instead.
Signed-off-by: Seongmin Lee <git@boltless.me>
there is a very strange bug in the bluesky-pds implementation that
prevents blobs with the text `<svg` from being uploaded. it triggers a
500 because the underlying MIME type detection library assumes XML but
the provided MIME type does not match.
ref: https://github.com/bluesky-social/atproto/issues/3151
gzipping the content lets us upload this without any issues.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: pompydev <pompydev@proton.me>
`hx-swap-oob` on breaks on `hx-boost` swaps (star button vainishing repo
tab changes), so that was why I made `starBtn-oob` fragment. But
`hx-swap-oob="outerHTML:..."` doesn't strip the wrapper element, adding
`div` wrappers to star button on every star/unstar interactions.
To fix this, dynamically put `hx-swap-oob` attribute to star button
itself by using `.HxSwapOob` param.
Signed-off-by: Seongmin Lee <git@boltless.me>
thanks @nel.pet!
Signed-off-by: oppiliappan <me@oppi.li>
The follow button now returns the updated followers count alongside the button state, keeping them in sync
Signed-off-by: moshyfawn <email@moshyfawn.dev>
Prevents horizontal scrollbar overflow in Safari when markdown content
contains long unbreakable strings like URLs
Signed-off-by: moshyfawn <email@moshyfawn.dev>
favicon was not following prefers-color-scheme.
Signed-off-by: oppiliappan <me@oppi.li>
incorporates changes suggested by @boltless.me
Co-authored-by: Seongmin Lee <git@boltless.me>
Signed-off-by: oppiliappan <me@oppi.li>
these files are now generated at build time.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Seongmin Lee <git@boltless.me>
Spindle will sync git repo when new repo is registered
Spindle will listen to `sh.tangled.git.refUpdate` event from knot
stream and sync its local git repo instead. Spindle's git repo will
sparse-checkout only `/.tangled/workflows` directory.
Spindle now requires git version >=2.49 for `--revision` flag in `git
clone` command.
References:
- <https://stackoverflow.com/q/47541033/13150270>
- <https://stackoverflow.com/q/600079/13150270>
Signed-off-by: Seongmin Lee <git@boltless.me>
spindle-tap will collect/stream record events from:
- users dynamically added by spindle (spindle members | collaborators of
repos using spindle)
- any users with `sh.tangled.repo.pull` collection
It might be bit inefficient considering it will also stream repo
creation events from PR authors due to second rule, but at least we now
have backfill logic and Sync 1.1 based syncing.
This inefficiency can be fixed later by modifying upstream tap cli or
embedding tap into spindle.
```
+--------- all tangled users --------+
| |
| +-- users known to spindle-tap --+ |
| | (PR author / manually added) | |
| | | |
| | +----------------------------+ | |
| | | users known to spindle | | |
| | | (members / collaborators) | | |
| | +----------------------------+ | |
| +--------------------------------+ |
+------------------------------------+
```
Close: <https://tangled.org/tangled.org/core/issues/341>
Signed-off-by: Seongmin Lee <git@boltless.me>
1. Use repo AT-URI as identifier.
2. Use `dom` field rather than `obj` to filter by repository. So now
it's "user with role A in repo B can do action D to field C" where
`A,B,C,D` are `sub,dom,obj,act`.
3. Manage app-logic rules in embedded csv file which won't be saved in
db and load to memory on start. This makes app's global rbac rule
change easier as we just need to edit the csv file.
Many permission check methods are missing, but should be enough to test
this new RBAC enforcer package in spindle.
Related issue: <https://tangled.org/tangled.org/core/issues/282>
Signed-off-by: Seongmin Lee <git@boltless.me>
the new 3-panel layout puts the diff upfront, and the review panel off
to the right. on mobile devices, the review panel is a collapsible
bottom-sheet, and on desktop, it is a collapsible side-panel. it is now
possible to comment on a PR while viewing its diff.
all the JS on the page is entirely optional and simply added for
quality-of-life (such as auto-collapsing the bottomsheet on mobile
etc.).
in the review panel, submissions are listed with a top-level entry, and
comments on each submission are "reply" entries. the top-level
submission header includes the following information:
- commit messages and bodies (if available, on patch PRs this is
omitted)
- pipeline status (if avaiable, only for PRs that have triggered CI)
- mergability (if available, this is calculated only for the
latest submission)
the actual merge status (merged/closed/deleted) of the PR is listed
above the pull-action bar. previous designs combined the mergability
check and the merge-status into one component.
Signed-off-by: oppiliappan <me@oppi.li>
Add offset-based pagination to the pulls page, matching the issues behavior
Signed-off-by: moshyfawn <email@moshyfawn.dev>
Signed-off-by: Seongmin Lee <git@boltless.me>
there is a very strange bug in the bluesky-pds implementation that
prevents blobs with the text `<svg` from being uploaded. it triggers a
500 because the underlying MIME type detection library assumes XML but
the provided MIME type does not match.
ref: https://github.com/bluesky-social/atproto/issues/3151
gzipping the content lets us upload this without any issues.
Signed-off-by: oppiliappan <me@oppi.li>
`hx-swap-oob` on breaks on `hx-boost` swaps (star button vainishing repo
tab changes), so that was why I made `starBtn-oob` fragment. But
`hx-swap-oob="outerHTML:..."` doesn't strip the wrapper element, adding
`div` wrappers to star button on every star/unstar interactions.
To fix this, dynamically put `hx-swap-oob` attribute to star button
itself by using `.HxSwapOob` param.
Signed-off-by: Seongmin Lee <git@boltless.me>
incorporates changes suggested by @boltless.me
Co-authored-by: Seongmin Lee <git@boltless.me>
Signed-off-by: oppiliappan <me@oppi.li>