Skip to content

Conversation

@Soofmaax
Copy link

@Soofmaax Soofmaax commented Feb 6, 2026

Adds a minimal client-side search to the Journal tab so users can quickly filter entries by title or content (case-insensitive).
No backend changes.
Closes #14

Type of Change

🐛 Bug fix

✨ New feature

💥 Breaking change

📚 Documentation update

🧹 Code refactoring

⚡ Performance improvement

✅ Test improvement

🔧 Build or CI/CD configuration changes

How Has This Been Tested?

Open Dashboard → Journal tab

Entries load correctly

Typing in search filters instantly (title OR content)

Case-insensitive

Clearing search shows all entries

Loading, empty state, and “no results” states verified

Screenshots

N/A (small UI addition only)

Checklist

My code follows the style guidelines of this project

I have performed a self-review of my own code

I have commented my code, particularly in hard-to-understand areas

I have made corresponding changes to the documentation

My changes generate no new warnings

I have added tests that prove my fix is effective or that my feature works

New and existing unit tests pass locally with my changes

Any dependent changes have been merged and published in downstream modules

Additional Information

Frontend-only change.
Only frontend/src/pages/Dashboard.tsx modified.
No new dependencies.

Learning Outcomes

Improved understanding of client-side filtering and React state management.

Soofmaax and others added 4 commits February 6, 2026 16:36
…e OPENMINDWELL_PROJECT_GUIDE.md to Project_Guide.md, and fix typo 'deatailed' to 'detailed'

Co-authored-by: Cosine <agent@cosine.sh>
docs: fix README references, clone URL, and typo
… handling

Co-authored-by: Cosine <agent@cosine.sh>
@ayushHardeniya
Copy link
Member

ayushHardeniya commented Feb 8, 2026

kindly rebase your commit history!
also pull from upstream

Copy link
Collaborator

@Blazzzeee Blazzzeee left a comment

Choose a reason for hiding this comment

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

Please dont use useEffect for this , you should check on tanstack query and mutations

Comment on lines +223 to +241
const [searchQuery, setSearchQuery] = useState('');

useEffect(() => {
let isMounted = true;

async function loadEntries() {
try {
const data = await journalApi.getAll();
if (!isMounted) return;
setEntries(Array.isArray(data) ? data : []);
} catch (err) {
console.error('Error loading journal entries:', err);
if (!isMounted) return;
setError('Failed to load journal entries.');
} finally {
if (!isMounted) return;
setLoading(false);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

useEffect should only be used for external dependency sync , not render , please change this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add search to journal entries

3 participants