Implementing tidy text output with results tracing - #15
Merged
Conversation
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>
Copilot created this pull request from a session on behalf of
potemkin666
May 3, 2026 11:48
View session
potemkin666
marked this pull request as ready for review
May 3, 2026 11:48
There was a problem hiding this comment.
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
artifactintent 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
artifactTypesin 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 beforereturn, and mis-indented properties insidemeta). 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 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); | ||
| } | ||
| }); |
| <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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request created by AI Agent