Skip to content

feat(weekly-brief): add shared interfaces for weekly brief domain#775

Draft
manishdixitlfx wants to merge 3 commits into
mainfrom
feat/wg-weekly-brief-shared-interfaces
Draft

feat(weekly-brief): add shared interfaces for weekly brief domain#775
manishdixitlfx wants to merge 3 commits into
mainfrom
feat/wg-weekly-brief-shared-interfaces

Conversation

@manishdixitlfx
Copy link
Copy Markdown
Contributor

@manishdixitlfx manishdixitlfx commented May 24, 2026

Tracking: LFXV2-1981 (part of Epic LFXV2-1976)


Summary

Adds the @lfx-one/shared TypeScript interfaces for the WG Weekly Brief feature. Pure type additions — no runtime code.

What's new

  • packages/shared/src/interfaces/weekly-brief.interface.ts:
    • WeeklyBriefState union (empty | generating | generated | edited | approved | error)
    • WeeklyBriefSourceRef — claim_id + source provenance for citations
    • WeeklyBrief — full draft entity matching the committee-service domain shape
    • WeeklyBriefThrottle — per-committee/per-week generate + regenerate counters
    • WeeklyBriefCurrentResponse, request/response shapes
  • packages/shared/src/interfaces/index.ts exports

Shapes mirror the committee-service Goa types so the BFF can pass through without remapping.

Stack

PR 1/4 on lfx-self-serve. Independent base = main. PRs #6-8 stack on top.

Test plan

  • yarn lint / yarn build green (verified)
  • Types compile cleanly across the monorepo

Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
Copilot AI review requested due to automatic review settings May 24, 2026 18:56
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d435a00d-c903-492b-b046-9d185f17fee1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/wg-weekly-brief-shared-interfaces

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new Weekly Brief domain TypeScript interfaces to @lfx-one/shared so downstream apps/services (e.g., BFF) can share the committee-service-aligned shapes without remapping.

Changes:

  • Introduced WeeklyBrief* domain interfaces/types (state, entities, throttle, request/response shapes).
  • Exported the new Weekly Brief interfaces via the shared interfaces barrel.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/shared/src/interfaces/weekly-brief.interface.ts Adds Weekly Brief domain types/interfaces (state, entity, throttle, API shapes).
packages/shared/src/interfaces/index.ts Re-exports the Weekly Brief interfaces from the shared interfaces barrel.

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

Comment thread packages/shared/src/interfaces/weekly-brief.interface.ts Outdated
manishdixitlfx added a commit that referenced this pull request May 24, 2026
Introduce a closed `WeeklyBriefSourceType` union and use it on
WeeklyBriefSourceRef.source_type instead of `string` with an inline
comment listing the values (per copilot-pull-request-reviewer). Both
the BFF and the Angular service consume this type, so widening it to a
real union restores type-safety at every call site without runtime
cost.

Resolves 1 review thread.

Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
@manishdixitlfx
Copy link
Copy Markdown
Contributor Author

Review Feedback Addressed

Commit: cc5c4af

Changes Made (per copilot-pull-request-reviewer)

  • packages/shared/src/interfaces/weekly-brief.interface.ts: introduced a closed WeeklyBriefSourceType union and use it on WeeklyBriefSourceRef.source_type. Restores type-safety at every call site.

Threads Resolved

1 of 1 unresolved threads addressed in this iteration.

Introduce a closed `WeeklyBriefSourceType` union and use it on
WeeklyBriefSourceRef.source_type instead of `string` with an inline
comment listing the values (per copilot-pull-request-reviewer). Both
the BFF and the Angular service consume this type, so widening it to a
real union restores type-safety at every call site without runtime
cost.

Resolves 1 review thread.

Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>

Refs: LFXV2-1981
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
@manishdixitlfx manishdixitlfx force-pushed the feat/wg-weekly-brief-shared-interfaces branch from cc5c4af to 88e4d63 Compare May 24, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants