Skip to content

Commit 4a01ccf

Browse files
committed
removed range filter
1 parent 6820e62 commit 4a01ccf

File tree

3 files changed

+5
-54
lines changed

3 files changed

+5
-54
lines changed

src-tauri/src/kmd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
//! - authors/: Author profile cache
1010
1111
use std::fs::{self, File};
12-
use std::io::{Read, Write};
12+
use std::io::Write;
1313
use std::path::PathBuf;
1414

1515
use chrono::Utc;
16-
use rusqlite::{params, Connection};
16+
use rusqlite::Connection;
1717
use serde::{Deserialize, Serialize};
1818
use tauri::{AppHandle, Manager};
1919
use uuid::Uuid;
2020
use zip::write::FileOptions;
21-
use zip::{ZipArchive, ZipWriter};
21+
use zip::ZipWriter;
2222

2323
use docx_rs::*;
2424
use pulldown_cmark::{Event, Tag, TagEnd, Parser, HeadingLevel, CodeBlockKind, Options};

src/index.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,7 @@ <h3>Timeline</h3>
191191
<option value="rejected">Rejected</option>
192192
</select>
193193
</div>
194-
<div class="timeline-controls" style="margin-top: 4px;">
195-
<label style="font-size: 10px; color: var(--text-muted);">Lines:</label>
196-
<input id="filter-line-start" type="number" min="1" placeholder="Start" style="width: 50px;"
197-
class="compact-select">
198-
<input id="filter-line-range" type="number" min="1" placeholder="Range" style="width: 50px;"
199-
class="compact-select">
200-
<button id="clear-line-filter" class="format-btn" title="Clear line filter"></button>
201-
</div>
194+
202195
</div>
203196

204197
<div id="timeline-list" class="timeline-list">

src/timeline.js

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,7 @@ export function initTimeline() {
183183
const filterAuthor = document.getElementById("filter-author");
184184
const filterStatus = document.getElementById("filter-status");
185185
const resetBtn = document.getElementById("reset-to-original-btn");
186-
const lineStart = document.getElementById("filter-line-start");
187-
const lineRange = document.getElementById("filter-line-range");
188-
const clearLineFilter = document.getElementById("clear-line-filter");
186+
189187

190188
// Wire up sort dropdown
191189
if (sortSelect) {
@@ -207,27 +205,7 @@ export function initTimeline() {
207205
});
208206
}
209207

210-
// Wire up line range filter inputs
211-
if (lineStart) {
212-
lineStart.addEventListener("change", () => {
213-
refreshTimeline();
214-
});
215-
}
216-
217-
if (lineRange) {
218-
lineRange.addEventListener("change", () => {
219-
refreshTimeline();
220-
});
221-
}
222208

223-
// Wire up clear line filter button
224-
if (clearLineFilter) {
225-
clearLineFilter.addEventListener("click", () => {
226-
if (lineStart) lineStart.value = "";
227-
if (lineRange) lineRange.value = "";
228-
refreshTimeline();
229-
});
230-
}
231209

232210
// Wire up reset button
233211
if (resetBtn) {
@@ -276,11 +254,7 @@ export async function renderPatchList(patches) {
276254
const authorFilter = document.getElementById("filter-author")?.value || "all";
277255
const statusFilter = document.getElementById("filter-status")?.value || "all";
278256
const sortOrder = document.getElementById("timeline-sort")?.value || "time-desc";
279-
const lineStart = parseInt(document.getElementById("filter-line-start")?.value) || null;
280-
const lineRange = parseInt(document.getElementById("filter-line-range")?.value) || null;
281257

282-
// Calculate line end from start + range
283-
const lineEnd = (lineStart !== null && lineRange !== null) ? lineStart + lineRange : null;
284258

285259
// Populate author dropdown with unique authors (use ID for value, name for display)
286260
const filterAuthorSelect = document.getElementById("filter-author");
@@ -472,23 +446,7 @@ export async function renderPatchList(patches) {
472446
conflictInfo = formatConflictInfo(patch.id, conflictingIds);
473447
}
474448

475-
// Apply line range filter if set
476-
if (lineStart !== null || lineEnd !== null) {
477-
if (!patch._lineRange) {
478-
return; // Skip patches without line range data when filtering
479-
}
480-
481-
const patchStart = patch._lineRange.startLine;
482-
const patchEnd = patch._lineRange.endLine;
483449

484-
// Check if patch overlaps with the requested range
485-
if (lineStart !== null && patchEnd < lineStart) {
486-
return; // Patch is entirely before the requested range
487-
}
488-
if (lineEnd !== null && patchStart > lineEnd) {
489-
return; // Patch is entirely after the requested range
490-
}
491-
}
492450

493451
// Get review badges for this patch (excluding current user's self-review)
494452
let reviewBadges = '';

0 commit comments

Comments
 (0)