@@ -1735,24 +1735,29 @@ describe("Tier 1 - Feature Coverage", () => {
17351735 ) ,
17361736 ) ;
17371737
1738- // 3. htmlToMarkdown strips client-only interactive transcript modal chrome
1738+ // 3. htmlToMarkdown strips client-only interactive transcript modal chrome and Ask Agent drawer
17391739 const { htmlToMarkdown } = loadModule ( "src/lib/html-to-markdown.ts" ) ;
17401740 const sampleHtml = `
1741- <main>
1742- <article>
1743- <h1>Sample Episode</h1>
1744- <div class="transcript-widget inline-block">
1745- <button class="transcript-open-btn">View Transcript</button>
1746- <div class="transcript-modal hidden">
1747- <div>
1748- <p>Fetching transcript from YouTube...</p>
1749- <footer><span>Loading transcript...</span></footer>
1741+ <body>
1742+ <main>
1743+ <article>
1744+ <h1>Sample Episode</h1>
1745+ <div class="transcript-widget inline-block">
1746+ <button class="transcript-open-btn">View Transcript</button>
1747+ <div class="transcript-modal hidden">
1748+ <div>
1749+ <p>Fetching transcript from YouTube...</p>
1750+ <footer><span>Loading transcript...</span></footer>
1751+ </div>
17501752 </div>
17511753 </div>
1752- </div>
1753- <p>Real episode content.</p>
1754- </article>
1755- </main>
1754+ <p>Real episode content.</p>
1755+ </article>
1756+ </main>
1757+ <aside id="aj-agent-drawer" data-markdown-ignore="true">
1758+ <p>Ask anything about CodingCat.dev podcasts, tutorials, guests, or transcripts.</p>
1759+ </aside>
1760+ </body>
17561761 ` ;
17571762 const md = htmlToMarkdown (
17581763 sampleHtml ,
@@ -1763,6 +1768,10 @@ describe("Tier 1 - Feature Coverage", () => {
17631768 ! md . includes ( "Fetching transcript from YouTube" ) ,
17641769 "Must strip client-only modal loading skeleton from Markdown" ,
17651770 ) ;
1771+ assert . ok (
1772+ ! md . includes ( "Ask anything about CodingCat.dev podcasts" ) ,
1773+ "Must strip Ask Agent drawer from Markdown output" ,
1774+ ) ;
17661775 } ) ;
17671776
17681777 it ( "7.20 Agent AJ /api/chat integrates Cloudflare Clairic (@cf/cloudflare/clairic) extraction cascade and fastpath fallback" , async ( ) => {
@@ -1869,6 +1878,7 @@ describe("Tier 1 - Feature Coverage", () => {
18691878 assert . ok ( chatDrawerSource . includes ( "aj-agent-drawer" ) ) ;
18701879 assert . ok ( chatDrawerSource . includes ( "aj-drawer-resize-handle" ) ) ;
18711880 assert . ok ( chatDrawerSource . includes ( "cc_aj_drawer_open" ) ) ;
1881+ assert . ok ( chatDrawerSource . includes ( 'toolname="ask_agent_aj"' ) ) ;
18721882 assert . ok (
18731883 ! chatDrawerSource . includes ( 'id="ai-chat-open-btn"' ) ,
18741884 "Must remove floating bottom-right Ask Agent AJ button" ,
@@ -1880,6 +1890,11 @@ describe("Tier 1 - Feature Coverage", () => {
18801890 ) ;
18811891 assert . ok ( searchPageSource . includes ( "search-mode-ai-btn" ) ) ;
18821892 assert . ok ( searchPageSource . includes ( "search-clairic-pill" ) ) ;
1893+ assert . ok ( searchPageSource . includes ( 'toolname="search_content"' ) ) ;
1894+ assert . ok (
1895+ ! searchPageSource . includes ( "opacity-75" ) ,
1896+ "Must not reduce text-muted-foreground contrast with opacity-75" ,
1897+ ) ;
18831898 } ) ;
18841899 } ) ;
18851900} ) ;
0 commit comments