Skip to content

feat: implement gist viewing flow #121

Open
@nullcoder

Description

@nullcoder

Description

Implement complete viewing workflow integrating existing GistViewer component with decryption.

Priority

CRITICAL - This is a core functionality required for the application to be usable.

Tasks

  • Implement /g/[id] page route
  • Wire up GET /api/gists/[id] and /api/blobs/[id]
  • Handle URL fragment for encryption key
  • Integrate existing GistViewer component
  • Connect FileList component for file switching
  • Use existing CodeEditor with syntax highlighting
  • Wire up CopyButton component throughout
  • Use existing error states for expired/deleted gists

Technical Requirements

  • Must handle decryption using Web Crypto API
  • URL fragments (#key=...) must be preserved and not sent to server
  • Support both single and multi-file gists
  • Handle expired and one-time gists appropriately
  • Ensure proper error boundaries are in place

Acceptance Criteria

  • Gists decrypt and display correctly
  • File navigation works smoothly
  • Copy/download functions work
  • Expired gists show appropriate message
  • One-time gists are handled properly
  • Loading states are shown during data fetching
  • Error states handle all failure scenarios gracefully

Dependencies

  • Phase 5 APIs (GET endpoints)
  • Existing UI components from Phase 4:
    • GistViewer
    • FileList
    • CodeEditor
    • CopyButton
    • LoadingState
    • ErrorBoundary

Estimated Time

3-4 days

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature implementationpriority: criticalMust be done immediatelyuiUser interface and components

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions