Add v0.1.3 backend features: metadata fields and search
Backend Changes: - Add estimated_minutes field to tasks (stored as integer minutes) - Add tags field (JSON array) for categorizing tasks - Add flag_color field for visual priority indicators - Add search endpoint (/api/search) with project filtering - Update JSON import to handle new metadata fields Frontend Changes: - Display version v0.1.3 in header - Add search API client function - Add format utility for time display (30m, 1.5h, etc.) Example Data: - Update example-import.json with time estimates, tags, and flags - Demonstrate nested metadata inheritance Note: Frontend UI for displaying/editing these fields in progress
This commit is contained in:
@@ -7,10 +7,15 @@ function App() {
|
||||
<div className="min-h-screen bg-cyber-dark">
|
||||
<header className="border-b border-cyber-orange/30 bg-cyber-darkest">
|
||||
<div className="container mx-auto px-4 py-4">
|
||||
<h1 className="text-2xl font-bold text-cyber-orange">
|
||||
TESSERACT
|
||||
<span className="ml-3 text-sm text-gray-500">Task Decomposition Engine</span>
|
||||
</h1>
|
||||
<div className="flex justify-between items-center">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-cyber-orange">
|
||||
TESSERACT
|
||||
<span className="ml-3 text-sm text-gray-500">Task Decomposition Engine</span>
|
||||
<span className="ml-2 text-xs text-gray-600">v0.1.3</span>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -56,3 +56,12 @@ export const importJSON = (data) => fetchAPI('/import-json', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
|
||||
// Search
|
||||
export const searchTasks = (query, projectIds = null) => {
|
||||
const params = new URLSearchParams({ query });
|
||||
if (projectIds && projectIds.length > 0) {
|
||||
params.append('project_ids', projectIds.join(','));
|
||||
}
|
||||
return fetchAPI(`/search?${params.toString()}`);
|
||||
};
|
||||
|
||||
17
frontend/src/utils/format.js
Normal file
17
frontend/src/utils/format.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// Format minutes into display string
|
||||
export function formatTime(minutes) {
|
||||
if (!minutes || minutes === 0) return null;
|
||||
|
||||
if (minutes < 60) {
|
||||
return `${minutes}m`;
|
||||
}
|
||||
|
||||
const hours = minutes / 60;
|
||||
return `${hours.toFixed(1)}h`;
|
||||
}
|
||||
|
||||
// Format tags as comma-separated string
|
||||
export function formatTags(tags) {
|
||||
if (!tags || tags.length === 0) return null;
|
||||
return tags.join(', ');
|
||||
}
|
||||
Reference in New Issue
Block a user