Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Search issues, changes and comments from one page

72f222921280b3c6c920ee81f6595b52563bb648 · Keenan Nemetz · 10d ago · parent 6762a520

Search issues, changes and comments from one page

/search asks one question across the whole instance. The results are the
rows from the search table, shown with the kind, the repository, the
`#42` number when there is one, the author, and the matched sentence with
the match marked.

Two rules make the page honest:

- Visibility is the page rule, not a second one. The handler asks the
  index for the repositories the request may read and passes only those
  ids to the query, so a private repository's titles cannot appear.
- Freshness does not depend on a page having been visited. A search
  refreshes the repositories it is allowed to see before querying, so an
  issue pushed a minute ago is found even if nobody opened its repository
  since.

An exact `#42` or id prefix is answered before the text search, so the
entity someone named is the first row. The snippet is escaped before its
match markers become tags.

The header gains a Search item next to Activity; the repository search
box on the home page is unchanged.

server/web/static/vole.css +15

@@ -1682,6 +1682,21 @@ details[open] > summary .tree-chevron { transform: rotate(90deg); }
1682 1682 }
1683 1683 .row-meta .label { margin-left: 0; }
1684 1684
1685 /* A search snippet is the sentence the query matched, with the matched words
1686 marked. It sits under the row title, quieter than the title and smaller than
1687 the body it came from. */
1688 .search-snippet {
1689 margin: 3px 0 0;
1690 font-size: calc(12.65px * var(--font-scale));
1691 color: var(--fg-faint);
1692 }
1693 .search-snippet mark {
1694 background: var(--accent-soft);
1695 color: var(--fg);
1696 border-radius: 2px;
1697 padding: 0 1px;
1698 }
1699
1685 1700 .empty-state {
1686 1701 border: 1px dashed var(--border-strong);
1687 1702 border-radius: var(--radius-lg);