Skip to content

Add narrative chapters, NarrativeContext, and mission brief UI#81

Open
alexwelcing wants to merge 2 commits intomainfrom
codex/implement-chapter-management-system
Open

Add narrative chapters, NarrativeContext, and mission brief UI#81
alexwelcing wants to merge 2 commits intomainfrom
codex/implement-chapter-management-system

Conversation

@alexwelcing
Copy link
Copy Markdown
Owner

Motivation

  • Introduce a lightweight narrative layer so the app can present mission-style objectives and rewards tied to user actions.
  • Provide a persistent, unlockable chapter system that can be triggered by existing events like asking the AI, completing the game, or interacting with the tablet.
  • Surface current mission information in both an always-on overlay and the terminal UI so players know goals and rewards.
  • Wire narrative unlocks to existing gameplay/journey hooks to enable future story-driven progression and UX experiments.

Description

  • Add lib/narrative/chapters.ts containing 5 chapter objects with id, title, unlockCondition, reward, and brief.
  • Add components/NarrativeContext.tsx providing NarrativeProvider, useNarrative, persistent progress storage, triggerEvent, and current chapter management.
  • Add components/StoryObjectivePanel.tsx which renders the active mission brief as an overlay and integrate it into components/ThreeSixty.tsx.
  • Update components/TerminalInterface.tsx to display the mission brief in the About tab and call triggerEvent('first-question') when a chat is submitted, and update components/InteractiveTablet.tsx to call triggerEvent('artifact-interaction') when the terminal is opened; also wrap the app with NarrativeProvider in pages/_app.tsx.

Testing

  • Started a local development server with npm run dev, and Next.js reported ready (server start succeeded).
  • Attempted an automated Playwright script to capture the UI, but the run failed with net::ERR_CONNECTION_REFUSED and could not reach the running site (screenshot attempt failed).
  • No unit or integration test suites were executed as part of this change (no automated Jest/Playwright test runs completed).

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
next-docs-search Error Error Dec 20, 2025 7:30pm

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.

1 participant