Skip to content

feat: Global GenAI context panel (v0) — AWSUI-52880 [WIP]#4822

Draft
ernst-dev wants to merge 1 commit into
mainfrom
feat/genai-context-panel-wip
Draft

feat: Global GenAI context panel (v0) — AWSUI-52880 [WIP]#4822
ernst-dev wants to merge 1 commit into
mainfrom
feat/genai-context-panel-wip

Conversation

@ernst-dev

Copy link
Copy Markdown
Member

Description

[WIP / v0] First cut of a reusable Global GenAI context panel — a drawer surface for a generative-AI assistant's context (system prompt, active model, and files currently in scope), designed to drop into AppLayout drawers. Tracks AWSUI-52880.

This is intentionally additive and opt-in and is not part of the public package API yet. It lives as an internal composition (src/internal/components/genai-context-panel) built entirely from existing Cloudscape primitives (PromptInput, Select, FormField, FileTokenGroup, Header, Box, SpaceBetween), plus a createGenaiContextPanelDrawer() helper that returns a ready-to-use AppLayoutProps.Drawer.

Done in this v0

  • Controlled GenaiContextPanel internal component: system prompt editor, optional model selector, dismissible context-file list with empty state, full i18nStrings.
  • createGenaiContextPanelDrawer() helper producing an AppLayoutProps.Drawer (gen-ai trigger icon, resizable, badge support).
  • Dev page: pages/app-layout/genai-context-panel.page.tsx demonstrating end-to-end integration with AppLayout drawers.
  • 7 unit tests (render, controlled change events, empty state, conditional model selector, file dismiss, drawer factory).
  • quick-build (types), eslint ., and unit tests all green.

Remaining (follow-ups, out of scope for v0)

  • Design review / visual + a11y sign-off; decide final UX per the ticket's reference recording.
  • Promote to a public API (own src/genai-context-panel folder, interfaces docs, documenter snapshot, test-utils, i18n messages/JSON, index.ts export) once the API is agreed.
  • File attach/upload affordance inside the panel (currently list + remove only), drag-and-drop, multi-select, preview.
  • Model config beyond selection (temperature, max tokens, etc.).
  • Integration tests, RTL, a11y test page, and screenshot/permutation coverage.
  • Runtime-drawer (global drawer) variant.

How has this been tested?

  • npm run quick-build — passes (TypeScript compiles clean).
  • npx jest -c jest.unit.config.js genai-context-panel — 7/7 pass.
  • npx eslint . — 0 errors (only pre-existing warnings in unrelated files).
  • Manual: dev page app-layout/genai-context-panel renders the panel in an AppLayout drawer; editing prompt / selecting model / removing files updates state live.

Related links, issue #, if available: AWSUI-52880

Note: This is a WIP draft for early feedback on shape/approach. No public API is added yet, so no backward-compat or documenter impact.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.68293% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.60%. Comparing base (f97729a) to head (ba4cecc).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../internal/components/genai-context-panel/index.tsx 92.68% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4822      +/-   ##
==========================================
- Coverage   97.61%   97.60%   -0.01%     
==========================================
  Files         952      953       +1     
  Lines       30816    30857      +41     
  Branches    11318    11345      +27     
==========================================
+ Hits        30081    30119      +38     
- Misses        688      691       +3     
  Partials       47       47              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ernst-dev ernst-dev changed the title [WIP] feat: Global GenAI context panel (v0) — AWSUI-52880 feat: Global GenAI context panel (v0) — AWSUI-52880 [WIP] Jul 23, 2026
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.

1 participant