-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add handoff journal route with carry-forward notes #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iamasx
wants to merge
3
commits into
main
Choose a base branch
from
feat/174
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
src/app/handoff-journal/_components/action-bullet-list.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import type { ActionBullet } from "../_data/handoff-journal-data"; | ||
| import styles from "../handoff-journal.module.css"; | ||
|
|
||
| type ActionBulletListProps = { | ||
| entryTitle: string; | ||
| actions: ActionBullet[]; | ||
| }; | ||
|
|
||
| const toneLabelMap = { | ||
| now: "Immediate", | ||
| next: "Queued next", | ||
| watch: "Watch closely", | ||
| } as const; | ||
|
|
||
| export function ActionBulletList({ | ||
| entryTitle, | ||
| actions, | ||
| }: ActionBulletListProps) { | ||
| console.log(`Rendering ${actions.length} action bullets for ${entryTitle}`); | ||
|
|
||
| return ( | ||
| <section className={styles.actionSection}> | ||
| <div className={styles.sectionHeader}> | ||
| <p className={styles.sectionEyebrow}>Action bullets</p> | ||
| <p className={styles.sectionCaption}> | ||
| Compact, owner-tagged follow-through for the incoming shift. | ||
| </p> | ||
| </div> | ||
|
|
||
| <ul | ||
| aria-label={`${entryTitle} action bullets`} | ||
| className={styles.actionList} | ||
| role="list" | ||
| > | ||
| {actions.map((action) => ( | ||
| <li key={action.id} className={styles.actionItem}> | ||
| <span | ||
| aria-hidden | ||
| className={`${styles.actionDot} ${ | ||
| action.tone === "now" | ||
| ? styles.actionDotNow | ||
| : action.tone === "watch" | ||
| ? styles.actionDotWatch | ||
| : styles.actionDotNext | ||
| }`} | ||
| /> | ||
| <div className={styles.actionBody}> | ||
| <p className={styles.actionLabel}>{action.label}</p> | ||
| <div className={styles.actionMeta}> | ||
| <span className={styles.actionMetaPill}>{toneLabelMap[action.tone]}</span> | ||
| <span className={styles.actionMetaText}>{action.owner}</span> | ||
| <span className={styles.actionMetaText}>{action.timing}</span> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </section> | ||
| ); | ||
| } | ||
54 changes: 54 additions & 0 deletions
54
src/app/handoff-journal/_components/carry-forward-panel.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| import type { CarryForwardNote } from "../_data/handoff-journal-data"; | ||
| import styles from "../handoff-journal.module.css"; | ||
|
|
||
| type CarryForwardPanelProps = { | ||
| notes: CarryForwardNote[]; | ||
| }; | ||
|
|
||
| export function CarryForwardPanel({ notes }: CarryForwardPanelProps) { | ||
| return ( | ||
| <aside | ||
| aria-labelledby="carry-forward-title" | ||
| className={`${styles.surfacePanel} ${styles.carryForwardPanel}`} | ||
| id="carry-forward" | ||
| > | ||
| <div className={styles.panelHeading}> | ||
| <p className={styles.panelEyebrow}>Carry-forward</p> | ||
| <h2 id="carry-forward-title" className={styles.panelTitle}> | ||
| Compact notes for the incoming crew | ||
| </h2> | ||
| <p className={styles.panelDescription}> | ||
| Only unresolved items stay here, so the next shift can scan the | ||
| essentials without rereading every handoff card. | ||
| </p> | ||
| </div> | ||
|
|
||
| <div | ||
| aria-label="Carry-forward notes" | ||
| className={styles.carryForwardList} | ||
| role="list" | ||
| > | ||
| {notes.map((note) => ( | ||
| <article | ||
| key={note.id} | ||
| className={`${styles.carryForwardCard} ${ | ||
| note.tone === "open" | ||
| ? styles.carryForwardOpen | ||
| : note.tone === "monitor" | ||
| ? styles.carryForwardMonitor | ||
| : styles.carryForwardScheduled | ||
| }`} | ||
| role="listitem" | ||
| > | ||
| <div className={styles.carryForwardTop}> | ||
| <p className={styles.carryForwardLane}>{note.lane}</p> | ||
| <span className={styles.carryForwardCheck}>{note.nextCheck}</span> | ||
| </div> | ||
| <p className={styles.carryForwardNote}>{note.note}</p> | ||
| <p className={styles.carryForwardOwner}>{note.owner}</p> | ||
| </article> | ||
| ))} | ||
| </div> | ||
| </aside> | ||
| ); | ||
| } |
50 changes: 50 additions & 0 deletions
50
src/app/handoff-journal/_components/handoff-entry-card.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import { ActionBulletList } from "./action-bullet-list"; | ||
| import type { HandoffEntry } from "../_data/handoff-journal-data"; | ||
| import styles from "../handoff-journal.module.css"; | ||
|
|
||
| type HandoffEntryCardProps = { | ||
| entry: HandoffEntry; | ||
| }; | ||
|
|
||
| export function HandoffEntryCard({ entry }: HandoffEntryCardProps) { | ||
| return ( | ||
| <article | ||
| className={`${styles.entryCard} ${ | ||
| entry.tone === "steady" | ||
| ? styles.entrySteady | ||
| : entry.tone === "watch" | ||
| ? styles.entryWatch | ||
| : styles.entryUrgent | ||
| }`} | ||
| role="listitem" | ||
| > | ||
| <div className={styles.entryHeader}> | ||
| <div className={styles.entryHeaderCopy}> | ||
| <span className={styles.entryShiftBadge}>{entry.shiftLabel}</span> | ||
| <h3 className={styles.entryTitle}>{entry.title}</h3> | ||
| </div> | ||
| <div className={styles.entryMeta}> | ||
| <span className={styles.entryMetaPill}>{entry.window}</span> | ||
| <span className={styles.entryMetaText}>{entry.operator}</span> | ||
| <span className={styles.entryMetaText}>{entry.channel}</span> | ||
| </div> | ||
| </div> | ||
|
|
||
| <p className={styles.entrySummary}>{entry.summary}</p> | ||
|
|
||
| <ul | ||
| aria-label={`${entry.title} highlights`} | ||
| className={styles.highlightList} | ||
| role="list" | ||
| > | ||
| {entry.highlights.map((highlight) => ( | ||
| <li key={highlight} className={styles.highlightItem}> | ||
| {highlight} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
|
|
||
| <ActionBulletList actions={entry.actions} entryTitle={entry.title} /> | ||
| </article> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.