feat(web): search the whole panel from one place

Finding anything meant knowing which tab it lived in — fine once you
have learned the panel, hopeless before. ⌘K now covers cards,
repositories, issues, wiki pages and members at once.

Pages are matched in the browser, so the palette answers before it has
asked the server and stays useful while the forge is down. Each remote
source is queried independently and a source that fails is simply absent
from the results, rather than taking the others with it. Issues come
from one organization-wide request: per repository, the palette could
not afford them on every keystroke.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
nocodeandClaude Opus 5 committed 2026-09-24 18:46:04 +02:00
1 parent fcc82d82d6
commit 9acb523510
10 files changed
+926 -3

No files matched your search

+12 -3
View File
@@ -164,9 +164,15 @@ async function announce(channels) {
toast(`Annonce publiée (${result.messageId}).`);
}
function membersCard(guild, level) {
function membersCard(guild, level, initialSearch = '') {
const host = h('div', { class: 'stack' });
const search = input({ type: 'search', placeholder: 'Nom, pseudo ou identifiant…' });
// Pre-filled when the command palette sent us here for one member, so the
// link lands on that person rather than on the top of the roster.
const search = input({
type: 'search',
placeholder: 'Nom, pseudo ou identifiant…',
value: initialSearch,
});
const load = () =>
renderAsync(
@@ -305,6 +311,9 @@ function notificationsCard(guild, level) {
);
}
/** `#/discord?member=nom` — where the command palette points a member result. */
const memberQuery = () => new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('member') ?? '';
export async function render(host, { state }) {
const level = state.me.accessLevel;
mount(host, spinner());
@@ -356,7 +365,7 @@ export async function render(host, { state }) {
),
),
membersCard(guild, level),
membersCard(guild, level, memberQuery()),
card(
'Rôles',