Skip to content

Conversation

@hide-G
Copy link
Contributor

@hide-G hide-G commented Nov 15, 2025

Description

ユースケース連携デモのヘッダーが、デモ外のページに遷移しても残ったままになる問題を修正しました。

このPRは、Kiro IDEのAIエージェント機能を活用して作成した、私の2番目のGenUへのコントリビューションです 🎉

Problem

ユースケース連携デモ(例:ブログ記事作成、議事録作成)を開始した後、サイドバーの「ホーム」や「チャット」などをクリックしても、デモのヘッダーが画面上部に残ったままになっていました。

Solution

App.tsxに以下のロジックを追加:

  • デモが表示されている状態で、現在のページがデモフローに含まれているかチェック
  • デモフロー外のページに遷移した場合、デモを自動的に閉じる
  • パスの正規化処理を追加(先頭の/の有無を統一)

Changes

Modified Files:

  • packages/web/src/App.tsx

Key Changes:

  1. Added useEffect hook to monitor pathname changes
  2. Implemented path normalization for consistent comparison
  3. Automatically closes demo popup when navigating outside demo flow

Impact on existing users

機能追加のみで、既存の動作に影響はありません。デモを使用していないユーザーには変化がありません。

Testing

  • ✅ ユースケース連携デモを開始 → ヘッダーが表示される
  • ✅ ホームをクリック → ヘッダーが自動的に閉じる
  • ✅ デモを再開始 → 正常に動作
  • ✅ チャットをクリック → ヘッダーが自動的に閉じる
  • ✅ デモ内のページ間を移動 → ヘッダーは開いたまま

Note: This PR was created with the assistance of Kiro IDE's AI agent feature.

- Added logic to automatically close the inter-use-case demo popup when navigating to pages outside the demo flow

- Normalized path comparison to handle paths with or without leading slash

- Prevents demo header from remaining visible after navigation

Fixes the issue where the demo header stays visible when clicking Home or other navigation items while the demo is active.
Copy link
Contributor

@tbrand tbrand left a comment

Choose a reason for hiding this comment

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

不要な変更が含まれているように見えます。agent 関連の変更は、この PR で必要でしょうか?

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