Skip to content

TNQ-4 P1: Frontend shell hardcodes first-party extension IDs in ActivityStream, markdown, useProjectCounts #228

Description

@rawkode

Finding

TNQ-4 confirmed findings (multiple):

  1. ActivityStream (frontend/src/components/ActivityStream.vue) hardcodes specific extension event types (dev.comtrya.issues.*, dev.comtrya.pull-request.*, dev.comtrya.epic.*, etc.) and constructs navigation hrefs like /r/{workspace}/{repo}/issues/{number} — duplicating extension-owned route contracts in the shell.

  2. useProjectCounts (frontend/packages/sdk-vue/src/use-project-counts.ts) hardcodes ext_issues and ext_epics op names and specific event topics to maintain per-project count state. This is extension business logic in the generic SDK.

  3. Markdown renderer (frontend/packages/sdk-vue/src/markdown.ts) hardcodes /x/issues/{workspaceId}/{N} route inside the generic shell markdown renderer, coupling a kernel-generic component to ext_issues' URL shape.

Impact

P1 — wit-contract violation. Adding a new issue-like extension requires editing the shell. Renaming ext_issues routes breaks ActivityStream and the markdown cross-reference links silently. Conflicts with the SP6 goal that extensions are the single source of truth for their own surfaces.

Fix

  • Extension event manifests should declare a displayName, icon, and a routeTemplate (/r/{workspace}/{repo}/issues/{number}) so ActivityStream can drive navigation generically from the event data.
  • useProjectCounts should drive counts from extension-declared WIT ops via a manifest-based subscription, not hardcoded strings.
  • Markdown issue-link resolution should go through an extension-provided resolver, not a shell-embedded URL pattern.

These are design-level changes; the fix belongs in the SP6 / codegen phase. For now, file as a known architectural debt item.

Files

  • frontend/src/components/ActivityStream.vue
  • frontend/packages/sdk-vue/src/use-project-counts.ts
  • frontend/packages/sdk-vue/src/markdown.ts

Related

Priority

P1 — wit-contract violation; blocks extension ecosystem expansion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions