Commits
Signed-off-by: eti <eti@eti.tf>
benchmarked on a synthetic db (10k users, 500k follows, 500k stars,
50k repos), the per-source queries behind the following timeline were
slow because of missing indexes and a poor query shape:
- stars filtered by did had no usable index; sqlite picked
idx_stars_subject_type which matches nearly every row (~312ms)
- follower/following counts group by subject_did, which had no
index, forcing a full scan (~229ms)
- follows ordered by followed_at with no index sorted every matched
row in a temp b-tree (~157ms)
fixes:
- new indexes: stars(did, subject_type, created),
follows(subject_did), follows(followed_at), repos(created); the
latter two also let the global timeline read newest-first straight
off an index instead of sorting
- push the following-set membership check into sql with a subquery
(orm.FilterInSubquery) instead of materializing all followed dids
in go and binding them as hundreds of placeholders in three
separate queries
all benchmarked queries now run in ~1ms.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Useful during local testing.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
this is a temporary change to remove the copy-to-clipboard button in
readmes and blob views. to reintroduce this:
- understand if we need this at all (you can view raw, ctrl+a, ctrl+c)
- dedup code with existing copy-to-clipboard buttons
- figure out a good design for this in blob views, it is a bit cluttered
at the moment
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Also set etag for any small contents.
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Directly embedding xrpc response to page parameter makes super hard to
track which value is used where.
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Seongmin Lee <git@boltless.me>
Serving raw SVG from same origin can cause XSS attack.
Using octet-stream for SVG file will break the README rendering.
Thus, assuming knotmirror is hosted on different origin, appview will
just redirect to knotmirror for all `/raw/` blob paths.
Signed-off-by: Seongmin Lee <git@boltless.me>
the trending widget used a stretched link (absolute inset-0) inside a
position:relative table row. safari does not support positioned table
rows as containing blocks, so each row link stretched to a distant
ancestor and swallowed taps far outside the widget, e.g. the
global/following toggle on mobile. replace the table with real anchor
rows laid out on a grid.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Sorry for not catching this the first time!
Signed-off-by: Smit Patil <smit@smit.codes>
Signed-off-by: smit.codes <smit@smit.codes>
Signed-off-by: Smit Patil <smit@smit.codes>
Signed-off-by: smit.codes <smit@smit.codes>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
- new -kind flag selects between the logo and the full logotype
- -template now accepts a directory of templates
- -size accepts a bare width; height is derived from the template
viewBox aspect ratio
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: oppiliappan <me@oppi.li>
Lewis: May this revision serve well! <lewis@tangled.org>
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>
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>
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>
Restricts README detection to `README` or `README.<single_extension>` filenames only, preventing files like `README.Music.md` being selected to be rendered over `README.md`
Fixes [#604](https://tangled.org/tangled.org/core/issues/604)
Signed-off-by: Smit Patil <smit@smit.codes>
Lewis: May this revision serve well! <lewis@tangled.org>
Lewis: May this revision serve well! <lewis@tangled.org>
this pull request adds a "copy to clipboard" button on both the readme
of a repository and the file view shown when viewing a specific file
Signed-off-by: eti <eti@eti.tf>
Signed-off-by: dawn <dawn@mm.st>
Signed-off-by: oppiliappan <me@oppi.li>
"rkey-as-reponame" change came after the "did-for-repos". Most users
updating their knot won't have rkey-based repository.
Signed-off-by: Seongmin Lee <git@boltless.me>
Updating only on `refUpdate` event is unstable.
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: eti <eti@eti.tf>
benchmarked on a synthetic db (10k users, 500k follows, 500k stars,
50k repos), the per-source queries behind the following timeline were
slow because of missing indexes and a poor query shape:
- stars filtered by did had no usable index; sqlite picked
idx_stars_subject_type which matches nearly every row (~312ms)
- follower/following counts group by subject_did, which had no
index, forcing a full scan (~229ms)
- follows ordered by followed_at with no index sorted every matched
row in a temp b-tree (~157ms)
fixes:
- new indexes: stars(did, subject_type, created),
follows(subject_did), follows(followed_at), repos(created); the
latter two also let the global timeline read newest-first straight
off an index instead of sorting
- push the following-set membership check into sql with a subquery
(orm.FilterInSubquery) instead of materializing all followed dids
in go and binding them as hundreds of placeholders in three
separate queries
all benchmarked queries now run in ~1ms.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
this is a temporary change to remove the copy-to-clipboard button in
readmes and blob views. to reintroduce this:
- understand if we need this at all (you can view raw, ctrl+a, ctrl+c)
- dedup code with existing copy-to-clipboard buttons
- figure out a good design for this in blob views, it is a bit cluttered
at the moment
Signed-off-by: oppiliappan <me@oppi.li>
the trending widget used a stretched link (absolute inset-0) inside a
position:relative table row. safari does not support positioned table
rows as containing blocks, so each row link stretched to a distant
ancestor and swallowed taps far outside the widget, e.g. the
global/following toggle on mobile. replace the table with real anchor
rows laid out on a grid.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>