Skip to content

Commit 8f55dd0

Browse files
tsemachhjunie-agent
andcommitted
feat(popup): auto-fit table columns; remove unreliable per-row match indicator
Co-authored-by: Junie <junie@jetbrains.com>
1 parent 5f7e773 commit 8f55dd0

3 files changed

Lines changed: 20 additions & 33 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on Keep a Changelog,
66
and this project adheres to Semantic Versioning.
77

8+
## [1.0.17] - 2026-05-03
9+
### Changed
10+
- Captured Requests table now auto-sizes columns (▶ / Status / Method shrink to content; Path takes the remaining width with truncation + full-URL tooltip) so nothing overflows the popup.
11+
- Removed the per-row match indicator (●) column. The match indicator was unreliable — some matched URLs were not flagged — so it's been disabled until the matcher is fixed; the matched-row green tint is also gone.
12+
813
## [1.0.16] - 2026-05-03
914
### Changed
1015
- Captured Requests table column order is now **▶ | Status | Method | ● | Path**, so Status is right after the include toggle and Path expands to fill the remaining width.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apireplay",
3-
"version": "1.0.16",
3+
"version": "1.0.17",
44
"private": true,
55
"type": "module",
66
"scripts": {

src/popup/components/ApiPreview.ts

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ export function renderApiPaths(
99
onUpdateStatus: (requestKey: string, status: number | undefined) => void,
1010
options: { matchedKeys?: Record<string, number>; isReplaying?: boolean } = {}
1111
) {
12-
const matchedKeys = options.matchedKeys || {};
13-
const isReplaying = options.isReplaying === true;
12+
// Match indicator is currently disabled — matching has known reliability gaps where
13+
// some matched URLs were not flagged. Until the matcher is fixed, we hide the per-row
14+
// indicator and the green-tint highlight so users are not misled by stale state.
15+
void options;
1416
const rows = Object.entries(requests).sort(([a], [b]) => a.localeCompare(b));
1517

1618
function statusColorClass(status: number | undefined): string {
@@ -25,21 +27,13 @@ export function renderApiPaths(
2527
container.innerHTML = `
2628
<h4 class="font-semibold mb-1 text-xs">API Requests:</h4>
2729
${rows.length === 0 ? '<div class="text-xs opacity-70">No matching requests.</div>' : `
28-
<div class="border border-gray-300 dark:border-gray-600 rounded">
29-
<table class="w-full text-xs table-fixed">
30-
<colgroup>
31-
<col style="width: 2rem">
32-
<col style="width: 3.4rem">
33-
<col style="width: 3rem">
34-
<col style="width: 1.2rem">
35-
<col>
36-
</colgroup>
30+
<div class="border border-gray-300 dark:border-gray-600 rounded overflow-x-auto">
31+
<table class="w-full text-xs">
3732
<thead class="bg-gray-200 dark:bg-gray-800">
3833
<tr>
39-
<th class="text-left p-1" title="Include this request when replaying">▶</th>
40-
<th class="text-left p-1" title="HTTP response status (color-coded). Click to edit. Number in parentheses = replay hits.">Status</th>
41-
<th class="text-left p-1">Method</th>
42-
<th class="text-left p-1" title="${isReplaying ? 'Green = matched at least once during replay; gray = not yet matched' : 'Match indicator is shown during replay'}">●</th>
34+
<th class="text-left p-1 w-px whitespace-nowrap" title="Include this request when replaying">▶</th>
35+
<th class="text-left p-1 w-px whitespace-nowrap" title="HTTP response status (color-coded). Click to edit. Number in parentheses = replay hits.">Status</th>
36+
<th class="text-left p-1 w-px whitespace-nowrap">Method</th>
4337
<th class="text-left p-1">Path</th>
4438
</tr>
4539
</thead>
@@ -54,17 +48,6 @@ export function renderApiPaths(
5448
const statusBase = statusNum !== undefined ? String(statusNum) : '—';
5549
const statusText = replayCount > 0 ? `${statusBase} (${replayCount})` : statusBase;
5650
const enabled = request.enabled !== false;
57-
const matchHits = matchedKeys[key] || 0;
58-
const matchColor = !isReplaying
59-
? 'text-gray-300 dark:text-gray-600'
60-
: matchHits > 0
61-
? 'text-green-500'
62-
: 'text-gray-400 dark:text-gray-500';
63-
const matchTitle = !isReplaying
64-
? 'Match indicator is shown during replay'
65-
: matchHits > 0
66-
? `Matched ${matchHits} time(s) during current replay`
67-
: 'Not matched yet during current replay';
6851
const fullUrlAttr = request.url.replace(/"/g, '&quot;');
6952
const pathAttr = path.replace(/"/g, '&quot;');
7053
const statusTitle = statusNum !== undefined
@@ -74,11 +57,11 @@ export function renderApiPaths(
7457
: 'No status recorded (click to set)';
7558
const statusBadgeWidth = statusText.length > 3 ? 'min-w-[2.1rem] px-1' : 'w-7';
7659
return `
77-
<tr class="border-t border-gray-200 dark:border-gray-700${isReplaying && matchHits > 0 ? ' bg-green-50 dark:bg-green-900/20' : ''}">
78-
<td class="p-1">
60+
<tr class="border-t border-gray-200 dark:border-gray-700">
61+
<td class="p-1 w-px whitespace-nowrap">
7962
<input type="checkbox" class="request-enabled-toggle" data-request-key="${encodeURIComponent(key)}" ${enabled ? 'checked' : ''}>
8063
</td>
81-
<td class="p-1">
64+
<td class="p-1 w-px whitespace-nowrap">
8265
<button
8366
type="button"
8467
class="request-status-icon inline-flex items-center justify-center ${statusBadgeWidth} h-5 rounded-full text-[9px] font-bold text-white whitespace-nowrap ${statusColorClass(statusNum)}"
@@ -87,9 +70,8 @@ export function renderApiPaths(
8770
title="${statusTitle}"
8871
>${statusText}</button>
8972
</td>
90-
<td class="p-1">${request.method}</td>
91-
<td class="p-1 text-center ${matchColor}" title="${matchTitle}">●</td>
92-
<td class="p-1 cursor-pointer hover:text-blue-500 truncate" data-path="${pathAttr}" title="${fullUrlAttr}">${path}</td>
73+
<td class="p-1 w-px whitespace-nowrap">${request.method}</td>
74+
<td class="p-1 cursor-pointer hover:text-blue-500 truncate max-w-0" data-path="${pathAttr}" title="${fullUrlAttr}">${path}</td>
9375
</tr>
9476
`;
9577
})

0 commit comments

Comments
 (0)