Skip to content

Implementing tidy text output with results tracing - #15

Merged
potemkin666 merged 9 commits into
mainfrom
copilot/add-tidy-text-output
May 3, 2026
Merged

Implementing tidy text output with results tracing#15
potemkin666 merged 9 commits into
mainfrom
copilot/add-tidy-text-output

Conversation

Copilot AI commented May 3, 2026

Copy link
Copy Markdown
Contributor

Pull request created by AI Agent

Copilot AI and others added 9 commits May 3, 2026 11:23
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/3e1dea55-5c32-41a2-8e44-f4fe56ae700c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/3e1dea55-5c32-41a2-8e44-f4fe56ae700c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/3e1dea55-5c32-41a2-8e44-f4fe56ae700c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/3e1dea55-5c32-41a2-8e44-f4fe56ae700c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/3e1dea55-5c32-41a2-8e44-f4fe56ae700c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/a3b4d7de-23e1-40d0-98d0-f2178effb67c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/a3b4d7de-23e1-40d0-98d0-f2178effb67c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/a3b4d7de-23e1-40d0-98d0-f2178effb67c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/Tracer/sessions/a3b4d7de-23e1-40d0-98d0-f2178effb67c

Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
@potemkin666
potemkin666 marked this pull request as ready for review May 3, 2026 11:48
Copilot AI review requested due to automatic review settings May 3, 2026 11:48
@potemkin666
potemkin666 merged commit 6cfe9bc into main May 3, 2026
1 check failed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds “artifact-first” (digital bloodhound) query intent support plus new UI/result-insights tracing panels, and replaces CSV export with a tidy text export for the standalone UI.

Changes:

  • Extend query planning with artifact intent detection, scent/mutation variants, and artifact-focused query generation.
  • Add new result insight utilities (artifact profile, echo families, first-origin, contagion/consensus summaries) and surface artifactTypes in enrichment + standalone search metadata.
  • Update the docs UI (new insight panels, clickable/openable cards, new branding) and switch export to TXT.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/scorer.test.js Adds coverage for artifact-first scoring preference.
tests/resultInsights.test.js Adds coverage for new tracing/insights helper functions.
tests/queryPlanner.test.js Adds coverage for artifact query generation, scent variants, and artifact intent detection.
src/resultInsights.js Re-exports new result-insights helpers from shared implementation.
src/queryPlanner.js Re-exports generateScentVariants from shared query helpers.
src/enricher.js Persists artifactTypes onto enriched result metadata.
docs/styles/app.css Updates branding styles and adds styles for new tracing panels.
docs/scripts/standalone/search.js Adds tag-based scoring signals and includes artifactTypes in standalone result meta.
docs/scripts/shared/scoringShared.js Adds artifact-intent scoring weight overrides.
docs/scripts/shared/resultInsightsShared.js Implements artifact profile + tracing utilities (families, origin, contagion, consensus).
docs/scripts/shared/queryShared.js Adds artifact intent heuristics, scent variants, and artifact query generation.
docs/scripts/app.js Renders new tracing panels, adds open-in-new-tab card behavior, and adds TXT export.
docs/index.html Updates branding markup and adds new insight panel containers + TXT export button.
Comments suppressed due to low confidence (1)

docs/scripts/standalone/search.js:249

  • The dedupeStandalone(...).map(...) block has inconsistent indentation (extra indent before return, and mis-indented properties inside meta). This is hard to read and makes it easy to miss real brace/object-shape bugs during future edits.

Please reformat this block so the return aligns with const insights = ... and all meta properties are consistently indented.

  const expanded = expandRelevantResults(results, plan, extraRatio);
  const deduped = dedupeStandalone(expanded).map((result) => {
    const insights = buildResultInsights(result, query);
      return {
        ...result,
        meta: {
          ...(result.meta || {}),
          artifactTypes: insights.artifactTypes,
          entities: insights.entities,
          language: insights.language,
        languageLabel: insights.languageLabel,
        translationUrl: insights.translationUrl,
        reliability: insights.reliability,
        region: insights.region,
        ...(insights.timeline ? { timeline: insights.timeline, year: insights.timeline.year } : {}),
      },
    };

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

Comment on lines +25 to 35
const hasArtifactKeyword = ARTIFACT_KEYWORDS.test(raw);
const hasHashPattern = HASH_PATTERN.test(raw);
const hasFilenamePattern = FILENAME_PATTERN.test(raw);
const hasCssClassPattern = CSS_CLASS_PATTERN.test(raw) && /[-_.]/u.test(raw);
if (!raw) return 'name';
if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(raw)) return 'email';
if (looksLikePhone(raw)) return 'phone';
if (/\b(image|avatar|logo|photo|picture)\b/iu.test(raw) || /\.(png|jpe?g|gif|webp)$/iu.test(raw)) return 'image';
if (hasArtifactKeyword || hasHashPattern || hasFilenamePattern || hasCssClassPattern) return 'artifact';
if (/\b(inc|llc|ltd|corp|corporation|company|group|studio|labs?|agency|foundation|institute|university|college)\b/iu.test(raw)) return 'company';
if (/^@/u.test(raw) || (!/\s/u.test(raw) && /^[a-z0-9._-]{2,}$/iu.test(raw))) return 'handle';
Comment on lines +151 to +156
function compareEarliest(left = {}, right = {}) {
if (left.sortKey && right.sortKey) return left.sortKey.localeCompare(right.sortKey);
if (left.sortKey) return -1;
if (right.sortKey) return 1;
return (right.score || 0) - (left.score || 0);
}
Comment thread docs/scripts/app.js
Comment on lines 1208 to +1219
const card=document.createElement('div');card.className='card';
if(r.url){
card.dataset.openable='true';
card.tabIndex=0;
card.title='Double-click or press Enter/Space to open in a new tab';
card.addEventListener('dblclick',()=>openResultInNewTab(r.url));
card.addEventListener('keydown',(event)=>{
if(event.key==='Enter'||event.key===' '){
event.preventDefault();
openResultInNewTab(r.url);
}
});
Comment thread docs/index.html
<span class="brand-ring brand-ring-2"></span>
<span class="brand-beam"></span>
<span class="brand-shore"></span>
<img class="brand-logo" src="https://github.com/user-attachments/assets/cc3848d1-d1f4-4dbc-bbfd-1aff071af51f" alt="Tracer logo">
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.

3 participants