feat: in-app help, notifications panel and global search (#32)

F1 and "?" now open the wiki page of the screen inside the application
(/aiuto, mockup 011) from a copy of the wiki shipped next to the program,
so help works offline and always matches the installed version. Markdown
is converted in-house and fully encoded; images of the repository are
served from the copy. KHAEMHAT_HELP_URL sets the online wiki behind
"Apri nel wiki"; "Segnala un problema" opens a new issue of that repo.
A test checks that every page and menu entry has an existing wiki page.

The bell opens a notifications panel (mockup 010) with all/unread
filters and mark read. Broadcast notifications are now read per user
through sys_notification_reads / notification_reads instead of one
shared read_at.

The global search asks ISearchProvider implementations through
GlobalSearchService after a short pause; the first provider finds help
pages and sections, # and @ say which modules will fill them.

Escape also closes a side panel when the focus fell out of it.
Decisions in ADR 0023.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-11 19:39:17 +01:00
1 parent acb7e598d1
commit f415dc37a8
39 files changed
+1976 -107

No files matched your search

+50
View File
@@ -191,3 +191,53 @@ h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }
@media (max-width: 1279px) { .kh-home.kh-with-drawer { margin-right: 0; } }
@media (max-width: 999px) { .kh-wgrid > .widget { grid-column: 1 / -1; } }
@media (max-width: 599px) { .kh-wlist .badge { display: none; } }
/* ---- notifications panel (issue #32, mockup 010) ---- */
.kh-notif-filter { margin-bottom: 4px; }
.kh-notifs { list-style: none; margin: 0 -16px; padding: 0; }
.kh-notif { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--kh-border); }
.kh-notif.unread { background: var(--kh-accent-soft); }
.kh-notif .ico-box { width: 28px; height: 28px; flex: none; }
.kh-notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; border: 0; background: none; padding: 0; text-align: left;
font: inherit; color: var(--kh-text); cursor: pointer; }
.kh-notif-main .t { font-size: 12.5px; }
.kh-notif.unread .kh-notif-main .t { font-weight: 600; }
.kh-notif-main .s { font-size: 11.5px; color: var(--kh-text-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kh-notif-main .m { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--kh-text-3); }
.kh-notif-main:focus-visible { outline: 2px solid var(--kh-accent); outline-offset: 2px; border-radius: 4px; }
/* ---- help (issue #32, mockup 011) ---- */
.kh-help { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--kh-gap); align-items: start; margin-top: var(--kh-gap); }
.kh-help-index { padding: 8px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; max-height: calc(100vh - 190px); overflow: auto; }
.kh-help-group { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--kh-text-3); padding: 10px 8px 4px; }
.kh-help-link { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--kh-radius); color: var(--kh-text); text-decoration: none; font-size: 12.5px; }
.kh-help-link svg.i { color: var(--kh-text-3); }
.kh-help-link:hover { background: var(--kh-row-hover); }
.kh-help-link.on { background: var(--kh-accent-soft); color: var(--kh-accent-text); font-weight: 600; }
.kh-help-link.on svg.i { color: var(--kh-accent); }
.kh-help-body { padding: 22px 26px 28px; font-size: 13.5px; line-height: 1.6; color: var(--kh-text); min-width: 0; }
.kh-help-body h1 { font-size: 22px; font-weight: 650; margin: 0 0 10px; }
.kh-help-body h2 { font-size: 16px; font-weight: 600; margin: 26px 0 8px; }
.kh-help-body h3 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; }
.kh-help-body p, .kh-help-body ul, .kh-help-body ol { margin: 0 0 10px; }
.kh-help-body ul, .kh-help-body ol { padding-left: 22px; }
.kh-help-body li { margin: 2px 0; }
.kh-help-body a { color: var(--kh-accent-text); }
.kh-help-body code { font-family: var(--kh-font-mono, ui-monospace, Consolas, monospace); font-size: .92em; background: var(--kh-surface-3); border-radius: 4px; padding: 1px 4px; }
.kh-help-body pre { background: var(--kh-surface-2); border: 1px solid var(--kh-border); border-radius: var(--kh-radius); padding: 10px 12px; overflow: auto; font-size: 12px; line-height: 1.45; }
.kh-help-body pre code { background: none; padding: 0; }
.kh-help-body img { max-width: 100%; border: 1px solid var(--kh-border); border-radius: var(--kh-radius); margin: 6px 0; }
.kh-help-body hr { border: 0; border-top: 1px solid var(--kh-border); margin: 18px 0; }
.kh-help-body .callout { margin: 10px 0; font-size: 13px; }
.kh-help-body .callout p:last-child { margin-bottom: 0; }
.kh-help-meta { font-size: 12px; color: var(--kh-text-3); margin-bottom: 14px; }
.kh-help-meta p { margin: 0; }
.kh-help-table { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--kh-border); border-radius: var(--kh-radius); }
.kh-help-table table.grid { width: 100%; }
.kh-help-table table.grid td { white-space: normal; height: auto; padding: 6px 10px; max-width: none; vertical-align: top; }
.kh-help-table table.grid th { white-space: normal; text-align: left; }
/* Global search (mockup 009): the page a help section belongs to. */
.palette .hit .d { color: var(--kh-text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.palette .hit > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .hit .d:last-child { margin-left: auto; }
@media (max-width: 899px) { .kh-help { grid-template-columns: 1fr; } .kh-help-index { position: static; max-height: 240px; } }