Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ a required BuildKit secret, never through build arguments or committed files.

## Catalog and release

The next app release is **0.1.16**, also recorded in `web/package.json`.
The next app release is **0.1.17**, also recorded in `web/package.json`.
`catalog/entry.yaml` carries no committed version: the first tag (`v0.1.0`)
created `versions[]` with `ghcr.io/appthrust/tracker@sha256:<index-digest>`,
stream `0.1`; later tags append at publication time. Do not add a version with
an unbuilt or placeholder image digest. OpenAPI's `info.version` describes the
API schema, not the app release. This repository has no hand-maintained changelog.

After the release prerequisites are available, push the SemVer tag `v0.1.16`.
After the release prerequisites are available, push the SemVer tag `v0.1.17`.
The tag workflow:

1. Performs one multi-platform build on `ubuntu-24.04` for Linux amd64 and arm64,
Expand All @@ -205,8 +205,8 @@ The tag workflow:
Publication commands used by the workflow:

```sh
bun hack/publish-entry.ts submit --version 0.1.16 --digest sha256:<image-index-digest>
bun hack/publish-entry.ts await --version 0.1.16 --digest sha256:<image-index-digest>
bun hack/publish-entry.ts submit --version 0.1.17 --digest sha256:<image-index-digest>
bun hack/publish-entry.ts await --version 0.1.17 --digest sha256:<image-index-digest>
```

Writers are serialized by `tracker-catalog-publish`; the workflow is guarded to
Expand All @@ -227,7 +227,7 @@ After publication, each estate's `AppCatalogSource` syncs the signed catalog.
Install Issues from the Project Marketplace (Directory is an automatic
dependency). Existing `follow` installations on stream `0.1` roll to the new
version; `pinned` installations show `UpdateAvailable` and require an explicit
version update. Confirm the installation is Ready, `/releasez` reports `0.1.16`,
version update. Confirm the installation is Ready, `/releasez` reports `0.1.17`,
the Project lists the `tracker` Access Key space as Ready, and an exchanged key reads `/api/tracker/v1/me`. These are release steps,
not actions performed by a source-only version bump.

Expand Down
2 changes: 1 addition & 1 deletion cmd/server/internal/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "Tracker API",
"version": "0.1.16",
"version": "0.1.17",
"description": "Contract: design/API.md. One workspace per PLATFORM_PROJECT_ID. The bearer is the signed-in user's token or an Access Key assertion (audience tracker; scope tracker:read for GET, tracker:write otherwise). External-subject assertions resolve by immutable registered agent handle. GET scopes tracker:read; other methods tracker:write; missing scope is 403 insufficient_scope. Every key is refused on Admin routes. See /agent-guide for the collaboration protocol."
},
"servers": [
Expand Down
39 changes: 39 additions & 0 deletions design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,45 @@ not a prerequisite.
- Freshness: TanStack Query with optimistic updates and 15 s refetch on
focus/interval. No websockets in v1.

### Issue panel tabs (v0.1.17)

The side panel showed one issue; opening another replaced it. It now keeps the
issues a person opened as tabs, so several can be compared and returned to.

| Concept | Owner | Lifetime | Invariants |
| --- | --- | --- | --- |
| **Active issue** | the URL (`?issue=<identifier>`, unchanged) | the history entry | the panel is open iff `issue` is set; links, reload and back/forward keep working as before |
| **Open tabs** | the browser tab (`sessionStorage`), not the URL and not the server | until closed or the browser tab ends | ordered, no duplicates (identifiers compared upper-cased), at most 20; the active issue is always one of them |

Open tabs are a person's working set, not part of what a link means: a shared
link opens one issue, never someone else's tab strip.

Rules (pure, `web/src/model/panel-tabs.ts`):

- **Open** (click or `Enter` on a row/card, a URL with `issue`): the issue
becomes active; if it has no tab, one is appended to the right of the
previously active tab. A 21st tab evicts the least recently active one.
The command palette and links inside an issue (parent, children, blockers)
still go to the issue's full page, as before.
- **Browse** (`J`/`K`, arrows while the panel is open): the active tab's issue
is replaced in place, so walking a list does not leave a trail of tabs. When
the issue walked onto already has a tab, that tab becomes active instead and
nothing is replaced: browsing never closes a tab.
- **Close a tab** (its ×, middle click; `Esc` closes the active one): closing
the active tab activates the one to its right, else the one to its left;
closing the only tab closes the panel. Closing any other tab leaves the
active one alone.
- **Close the panel** (the panel's ×): every tab closes.
- A URL whose `issue` has no tab (deep link, back/forward to a closed issue)
opens it as a tab. Tabs survive moving between list pages, the board, a
sprint and the inbox; a page opened without `issue` shows no panel, and the
next open brings the strip back.
- A tab whose issue was deleted or is unknown shows the not-found state and
can be closed.

Only the active tab's issue is fetched and rendered; a tab is its identifier
plus the title last seen, so twenty tabs cost nothing until selected.

## Lifecycle

1. Tag `v0.1.0` in `appthrust/tracker` → `publish.yml` builds the image,
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appthrust/tracker",
"version": "0.1.16",
"version": "0.1.17",
"private": true,
"type": "module",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion web/src/copy/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ export const issueMessages = defineDashboardMessages({
'tracker.issue.properties': { defaultMessage: 'Properties', translations: { ja: 'プロパティ' } },
'tracker.issue.panel': { defaultMessage: 'Issue {identifier}', translations: { ja: '課題 {identifier}' } },
'tracker.issue.openFull': { defaultMessage: 'Open full page', translations: { ja: '全画面で開く' } },
'tracker.issue.closePanel': { defaultMessage: 'Close panel', translations: { ja: 'パネルを閉じる' } },
'tracker.issue.tabs': { defaultMessage: 'Opened issues', translations: { ja: '開いている課題' } },
'tracker.issue.closeTab': { defaultMessage: 'Close {identifier}', translations: { ja: '{identifier} を閉じる' } },
'tracker.issue.closeAllTabs': { defaultMessage: 'Close all tabs', translations: { ja: 'すべてのタブを閉じる' } },
'tracker.issue.notFoundTitle': { defaultMessage: '{identifier} not found', translations: { ja: '{identifier} が見つかりません' } },
'tracker.issue.notFoundBody': { defaultMessage: 'It may have been deleted, or the identifier is wrong.', translations: { ja: '削除されたか、番号が間違っている可能性があります。' } },
'tracker.issue.saveFailed': { defaultMessage: "Couldn't save the change", translations: { ja: '変更を保存できませんでした' } },
Expand Down
28 changes: 17 additions & 11 deletions web/src/features/agents/inbox-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// first, each answerable in place), then updates — answers to the caller's
// own questions and mentions — to acknowledge. Keyboard: J/K (or ↓/↑) move,
// 1–6 choose an option and Enter sends it (Enter on an update or with nothing
// chosen opens the issue in the side panel), O opens the issue, E marks an
// update as read, Esc closes the panel. After an answer the next item takes
// chosen opens the issue as a side panel tab), O opens the issue, E marks an
// update as read, Esc closes the active panel tab; with the panel open J/K
// browse within the active tab. After an answer the next item takes
// focus, so a run of decisions needs no mouse.
import { useQuery } from '@tanstack/react-query'
import { useNavigate } from '@tanstack/react-router'
Expand All @@ -15,6 +16,7 @@ import { useText } from '../../i18n'
import { paths } from '../../routes/paths'
import { Button, cn, EmptyState, formatDateTime, formatRelative, HrefLink, Loading, LoadFailed, Markdown, useDocumentTitle } from '../../ui'
import { IssuePanel } from '../issues/issue-detail'
import { usePanelTabs } from '../issues/use-panel-tabs'
import { isPlainShortcut } from '../ui-state'
import { ActorAvatar, ActorName } from './actor'
import { optionText, RequestCard } from './request-card'
Expand All @@ -39,8 +41,12 @@ export function InboxPage({ search }: { search: { issue?: string } }) {
const [focusedKey, setFocusedKey] = useState<string | null>(null)
const lastIndex = useRef(0)

const open = useCallback((identifier: string) => void navigate({ to: paths.inbox, search: { issue: identifier } } as never), [navigate])
const close = useCallback(() => void navigate({ to: paths.inbox, search: {} } as never), [navigate])
const setIssue = useCallback(
(issue: string | undefined, replace: boolean) => void navigate({ to: paths.inbox, search: issue ? { issue } : {}, replace, resetScroll: false } as never),
[navigate]
)
const panel = usePanelTabs(search.issue, setIssue)
const { open, browse, close } = panel
const acknowledge = useCallback((item: InboxItem) => {
if (item.kind === 'answer') ack.mutate({ answers: [item.request.id] })
else if (item.kind === 'mention') ack.mutate({ mentions: [item.comment.id] })
Expand Down Expand Up @@ -79,22 +85,22 @@ export function InboxPage({ search }: { search: { issue?: string } }) {
const step = key === 'j' || key === 'ArrowDown' ? 1 : -1
const next = ordered[index === -1 ? (step > 0 ? 0 : ordered.length - 1) : Math.min(Math.max(index + step, 0), ordered.length - 1)]!
focusKey(itemKey(next))
if (search.issue) open(itemIssue(next).identifier)
if (search.issue) browse(itemIssue(next))
} else if ((key === 'o' || key === 'O') && index !== -1) {
event.preventDefault()
open(itemIssue(ordered[index]!).identifier)
open(itemIssue(ordered[index]!))
} else if ((key === 'e' || key === 'E') && index !== -1) {
event.preventDefault()
acknowledge(ordered[index]!)
} else if (key === 'Escape' && search.issue) {
event.preventDefault()
close()
close(search.issue)
if (focusedKey) focusKey(focusedKey)
}
}
document.addEventListener('keydown', onKeyDown)
return () => document.removeEventListener('keydown', onKeyDown)
}, [ordered, focusedKey, focusKey, open, close, acknowledge, search.issue])
}, [ordered, focusedKey, focusKey, open, browse, close, acknowledge, search.issue])

const section = (title: string, list: InboxItem[], action?: ReactNode) =>
list.length === 0 ? null : (
Expand All @@ -111,9 +117,9 @@ export function InboxPage({ search }: { search: { issue?: string } }) {
return (
<li key={key} data-inbox-key={key} onFocusCapture={() => setFocusedKey(key)}>
{item.kind === 'request' ? (
<RequestCard request={item.request} variant="inbox" focused={focusedKey === key} onOpen={() => open(item.request.issue.identifier)} />
<RequestCard request={item.request} variant="inbox" focused={focusedKey === key} onOpen={() => open(item.request.issue)} />
) : (
<UpdateCard item={item} focused={focusedKey === key} onOpen={() => open(itemIssue(item).identifier)} onAck={() => acknowledge(item)} />
<UpdateCard item={item} focused={focusedKey === key} onOpen={() => open(itemIssue(item))} onAck={() => acknowledge(item)} />
)}
</li>
)
Expand Down Expand Up @@ -166,7 +172,7 @@ export function InboxPage({ search }: { search: { issue?: string } }) {
)}
</div>
</div>
{search.issue ? <IssuePanel identifier={search.issue} onClose={close} /> : null}
{panel.active ? <IssuePanel identifier={panel.active} panel={panel} /> : null}
</div>
)
}
Expand Down
Loading