Skip to content

Refine hono-door admin UI and public link lifecycle - #1

Merged
ts-76 merged 15 commits into
mainfrom
ui/refine-hono-door-ui-layout
Jul 6, 2026
Merged

ts-76 merged 15 commits into
mainfrom
ui/refine-hono-door-ui-layout

Conversation

@ts-76

@ts-76 ts-76 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Refine the hono-door-ui admin workflows for issuing, active links, reissue, archive, and archive preview behavior.
  • Remove public-facing role/token hash/count details from the UI and API surface where they are no longer part of the product model.
  • Add archive deletion, room ID uniqueness handling, i18n, and documentation updates for the current package split.

Validation

  • rtk bun run check
  • Fresh local Wrangler runtime check for room creation, token issue, active link listing, and public query-token redirect to HttpOnly cookie.
  • Admin UI login screen screenshot/accessibility snapshot review.

Copilot AI review requested due to automatic review settings July 6, 2026 07:30
@ts-76
ts-76 merged commit 3387536 into main Jul 6, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the hono-door admin UI + API lifecycle around issuing/reissuing, archiving, and archive preview/delete, while also simplifying the public/admin-facing model by removing role from types and UI surfaces. It also introduces bilingual (JA/EN) admin UI rendering and a more polished UI design system.

Changes:

  • Remove role from ShortLinkContext/token summaries and update admin/public rendering + docs accordingly.
  • Add roomId uniqueness enforcement across linkIds, plus archive deletion and richer archive-preview rendering hooks.
  • Add bilingual admin UI (language detection + i18n strings) and substantial CSS/layout/accessibility improvements.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/sample-public-page.tsx Removes Role display from the sample public page meta panel.
src/index.tsx Wires archive preview rendering through createDoorUi and adds a helper to render archived rooms via ShortLinkContext.
README.md Updates repo-level docs for roomId uniqueness, removed role, and new archive deletion endpoints.
packages/hono-door/src/types.ts Removes role and some deprecated issue inputs; adds ShortLinkDeletedLink type.
packages/hono-door/src/short-link.ts Plumbs new operations (revokeLinkToken, deleteArchivedLink) into the door surface.
packages/hono-door/src/operations.ts Implements roomId uniqueness enforcement, token revoke op, room snapshot recording, and archive deletion op.
packages/hono-door/src/middleware.ts Removes role from the ShortLinkContext injected into requests.
packages/hono-door/src/index.ts Re-exports the new ShortLinkDeletedLink type.
packages/hono-door/src/durable-objects/registry.ts Removes role from registry token records; adds room usage lookup + archive deletion + room cleanup.
packages/hono-door/src/durable-objects/public-link.ts Removes role from token storage/access/policy; adds DO-side deleteLinkData().
packages/hono-door/src/admin-api.ts Removes role from schemas; adds DELETE /admin/links/archive/:linkId; routes revoke through operations.
packages/hono-door/README.md Updates package-level docs for roomId uniqueness and removal of role.
packages/hono-door-ui/src/types.ts Adds locale support to page input types.
packages/hono-door-ui/src/styles.ts Major CSS refresh: design tokens, layout changes, dark mode polish, reduced motion support.
packages/hono-door-ui/src/pages.tsx Adds i18n-backed rendering for main pages and shared nav; updates copy structure; preview page still default-locale.
packages/hono-door-ui/src/index.ts Adds language detection middleware, archive deletion route, reissue-with-policy update flow, and archive preview render hook.
packages/hono-door-ui/src/i18n.ts Introduces JA/EN string tables and locale resolution helpers.
packages/hono-door-ui/src/generated/admin-ui-client.ts Regenerated bundled client JS to reflect new UI/i18n/layout behaviors.
packages/hono-door-ui/src/admin-ui-client.tsx Refactors client UI for i18n, improved “one-time URL/QR” handoff UX, archive deletion, and accessibility semantics.
packages/hono-door-ui/README.md Documents new archive preview renderer hook, archive deletion, and locale detection behavior.
packages/hono-door-ui/PRODUCT.md Adds product framing and UX/accessibility goals for hono-door-ui.
packages/hono-door-ui/DESIGN.md Adds an explicit design system/spec for the admin UI styling and behavior.
packages/hono-door-ui/.impeccable/design.json Adds generated design-system JSON for tooling.
packages/hono-door-ui/.impeccable/critique/2026-07-03T02-55-04Z__packages-hono-door-ui-src-pages-tsx.md Adds an automated design critique snapshot for pages.tsx.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 104 to 108
CREATE TABLE IF NOT EXISTS tokens (
token_hash TEXT PRIMARY KEY,
link_id TEXT NOT NULL,
label TEXT,
role TEXT NOT NULL,
room_id TEXT NOT NULL,
Comment on lines 184 to 188
INSERT INTO tokens (
token_hash,
link_id,
label,
role,
room_id,
Comment on lines 116 to +120
const room = normalizeRoomInput(input.room)
const roomId = room.id ?? input.roomId

if (roomId !== undefined) {
const roomInput: { title?: string; body?: string } = {}
const title = room.title ?? input.title
const body = room.body ?? input.body
if (title) roomInput.title = title
if (body) roomInput.body = body
if (roomInput.title !== undefined || roomInput.body !== undefined) {
await resolve(config.rooms, c).getByName(roomId).setState(roomInput)
await resolve(config.registry, c).getByName('default').recordRoomSet(roomId, roomInput)
}
}
const publicLink = resolve(config.publicLinks, c).getByName(input.linkId)
const roomId = room.id ?? input.roomId ?? await publicLink.getCurrentRoomId()
const availability = await ensureRoomIdAvailable(config, c, input.linkId, roomId)
if (!availability.ok) return availability
useCount: '利用回数',
none: '-',
qrCode: 'QR コード',
requiredFieldsInvalid: 'Required fields are missing or invalid.',
Comment on lines 133 to 137
export function renderAdminArchivePreviewPage({ linkId, room }: ArchiveRoomPreviewInput) {
const t = adminUiText[adminUiDefaultLocale]
return (
<html lang="ja">
<html lang={adminUiDefaultLocale}>
<head>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ts-76
ts-76 deleted the ui/refine-hono-door-ui-layout branch July 7, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants