commits
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
makes the homepage more "live".
Signed-off-by: oppiliappan <me@oppi.li>
this is already present in a migration. doing this causes a migration
error on fresh DBs.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Seongmin Lee <git@boltless.me>
Search was returning nil,nil on error, silently bypassing every
caller's error guard and causing a nil pointer dereference on the
result. Return nil,err instead.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Fix various misspellings found by the typos tool:
- Error messages: Forbiden -> Forbidden, insufficent -> insufficient
- Comments and docs: recieve -> receive, acheive -> achieve, etc.
- Variable names: Referencs -> References, intialize -> initialize
- HTML templates: Unubscribe -> Unsubscribe, explictly -> explicitly
- Function names: perferom -> perform
Also remove backwards compat code for is_deafult JSON field.
Add _typos.toml config for false positives (external APIs, etc.)
Signed-off-by: eti <eti@eti.tf>
uses a bit of js to modify the final link
Signed-off-by: oppiliappan <me@oppi.li>
using the include query param, the user can now select portions of the
repo feed to listen to
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: eti <eti@eti.tf>
Signed-off-by: eti <eti@eti.tf>
Signed-off-by: oppiliappan <me@oppi.li>
Previously, CreateRepo submitted the PLC DID before the remaining local setup steps had completed. If RBAC setup or hook installation failed after that point, the handler cleaned up local state but still left behind a published DID with no corresponding repo on disk. Move PLC submission to the end of the create flow so the DID is only published after local repo setup succeeds. Also roll back repo RBAC state during cleanup, and treat hook setup failure as fatal instead of silently continuing.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Validate return_url before storing it in the session: only relative
paths starting with "/" (and not "//") are accepted. Anything else —
absolute URLs and protocol-relative URLs — is replaced with "/".
Add tests covering the accepted and rejected cases.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Add logger *slog.Logger to Middleware struct and thread it through New().
Replace all log.Println/log.Printf calls with mw.logger.Error/Warn using
structured key-value pairs. Standalone functions (AuthMiddleware, Paginate)
use slog.Default() to avoid signature breakage. Update router.go call site
to pass s.logger.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Signed-off-by: Lucas Garron <code@garron.net>
Replace all log.Println/log.Printf calls across follow.go, star.go,
reaction.go, gfi.go, and profile.go with s.logger.Error/Warn/Info using
structured key-value pairs. Each handler opens with a child logger via
s.logger.With("handler", "FuncName"). Firehose-idempotent delete failures
(follow, star, reaction) use Warn; all other failures use Error.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Replace the image/ prefix match with an explicit allowlist of safe
binary MIME types. SVG is intentionally excluded as it supports
embedded scripts.
Normalize the knot-supplied Content-Type with mime.ParseMediaType
before classification to strip parameters and prevent bypass attempts.
Add X-Content-Type-Options: nosniff as defence-in-depth.
Add tests covering the allowlist invariants and the normalization
behaviour.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Signed-off-by: oppiliappan <me@oppi.li>
icon is replaced with spinner with request is inflight.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Cover each filter field individually to guard against future additions
that miss the boolean check. Also documents that non-filter fields
(RepoAt, IsOpen, Knot, Did, State, Page) intentionally do not count
as active filters.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Cover the sentinel-timestamp fast path, all two-header combinations
for the heuristic path, the line-10 boundary, and false cases
(empty, single line, plain diff, wrong timestamp, one header,
headers beyond line 10).
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
repos with more stars go higher up in the search results.
the final result order is a bit magic right now, generally speaking:
forks go lower, more stars go higher, for now.
some more areas of improvement:
- boosting for prefix matches
- boosting for exact matches
- boosting for matches in repo name over repo desc/topic/website etc.
Signed-off-by: oppiliappan <me@oppi.li>
to unindex repos when deleted. this changeset also includes a tweak to
the NewRepo event, to fix a bug with the document IDs of new repos (it
was always zero).
Signed-off-by: oppiliappan <me@oppi.li>
the input box is inside an actor-typeahead js component, so we need a
bit of TLC to make it line up.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
when the count of issues/pulls/stars changes, we reindex repo because it
is dependent on these fields.
Signed-off-by: oppiliappan <me@oppi.li>
to sort by number of stars/issues, we have to throw these into the bleve
index. as a result, we also need to reindex repos when new
issues/stars/pulls land on a repo.
Signed-off-by: oppiliappan <me@oppi.li>
also use yellow comment highlights.
Signed-off-by: oppiliappan <me@oppi.li>
This reverts commit 411b13efe4fd06d0594687d957f56d0eef74b658.
A single workflow failing to initialize would abort the entire pipeline.
Instead, mark the failed workflow and continue processing the rest,
matching the existing behavior for unknown engines.
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
Signed-off-by: Seongmin Lee <git@boltless.me>
Some rounded corners caused the background to show through.
Signed-off-by: tobinio <Tobias.frischmann1@gmail.com>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
This is more of a practical proposal than solving a direct
problem. We fire-and-forget our cursor updates even if
an event fails. Instead, we should have it in the same thread
as the record ingestion and not be silent about errors.
Also for verification I think a little retry-backoff would be in order.
Lewis: May this revision serve well! <lewis@tangled.org>
we could just use the knotmirror here directly instead of deploying from
the knot, but we'd need the knotmirror to update before the site. for
now just deploy from the knot.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
the subscription message schema was referencing a completely invalid ref, and the gitSync2 interface referenced a required property that doesn't exist
Lewis: May this revision serve well! <lewis@tangled.org>
override the default indigo xrpc client here to use one without retry
logic.
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Seongmin Lee <git@boltless.me>
Lewis: May this revision serve well! <lewis@tangled.org>
Signed-off-by: eti <eti@eti.tf>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
Signed-off-by: Seongmin Lee <git@boltless.me>
So that we can actually know the runtime subscription status and
resubscribe on requestCrawl
Signed-off-by: Seongmin Lee <git@boltless.me>
Fix various misspellings found by the typos tool:
- Error messages: Forbiden -> Forbidden, insufficent -> insufficient
- Comments and docs: recieve -> receive, acheive -> achieve, etc.
- Variable names: Referencs -> References, intialize -> initialize
- HTML templates: Unubscribe -> Unsubscribe, explictly -> explicitly
- Function names: perferom -> perform
Also remove backwards compat code for is_deafult JSON field.
Add _typos.toml config for false positives (external APIs, etc.)
Signed-off-by: eti <eti@eti.tf>
Previously, CreateRepo submitted the PLC DID before the remaining local setup steps had completed. If RBAC setup or hook installation failed after that point, the handler cleaned up local state but still left behind a published DID with no corresponding repo on disk. Move PLC submission to the end of the create flow so the DID is only published after local repo setup succeeds. Also roll back repo RBAC state during cleanup, and treat hook setup failure as fatal instead of silently continuing.
Validate return_url before storing it in the session: only relative
paths starting with "/" (and not "//") are accepted. Anything else —
absolute URLs and protocol-relative URLs — is replaced with "/".
Add tests covering the accepted and rejected cases.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Add logger *slog.Logger to Middleware struct and thread it through New().
Replace all log.Println/log.Printf calls with mw.logger.Error/Warn using
structured key-value pairs. Standalone functions (AuthMiddleware, Paginate)
use slog.Default() to avoid signature breakage. Update router.go call site
to pass s.logger.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Replace all log.Println/log.Printf calls across follow.go, star.go,
reaction.go, gfi.go, and profile.go with s.logger.Error/Warn/Info using
structured key-value pairs. Each handler opens with a child logger via
s.logger.With("handler", "FuncName"). Firehose-idempotent delete failures
(follow, star, reaction) use Warn; all other failures use Error.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Replace the image/ prefix match with an explicit allowlist of safe
binary MIME types. SVG is intentionally excluded as it supports
embedded scripts.
Normalize the knot-supplied Content-Type with mime.ParseMediaType
before classification to strip parameters and prevent bypass attempts.
Add X-Content-Type-Options: nosniff as defence-in-depth.
Add tests covering the allowlist invariants and the normalization
behaviour.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
repos with more stars go higher up in the search results.
the final result order is a bit magic right now, generally speaking:
forks go lower, more stars go higher, for now.
some more areas of improvement:
- boosting for prefix matches
- boosting for exact matches
- boosting for matches in repo name over repo desc/topic/website etc.
Signed-off-by: oppiliappan <me@oppi.li>
This is more of a practical proposal than solving a direct
problem. We fire-and-forget our cursor updates even if
an event fails. Instead, we should have it in the same thread
as the record ingestion and not be silent about errors.
Also for verification I think a little retry-backoff would be in order.
Lewis: May this revision serve well! <lewis@tangled.org>