Feature: Expand test-setup script with threads, reactions, and emoji #50
Labels
No labels
area:api
area:core
area:docs
area:infra
area:ux
dependencies
documentation
duplicate
good first issue
help wanted
invalid
question
rust
status:complete
status:partial
status:planned
type:bug
type:design
type:feature
type:infra
type:refactor
type:research
type:ux
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
icub3d/decentcom#50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrated from GitHub issue icub3d/decentcom#70
Original Author: @icub3d
Original Date: 2026-04-17T00:40:23Z
Feature: Expand test-setup script with threads, reactions, and emoji
Overview
The current
scripts/test-setup.pyseeds test databases with users, channels, roles, and basic messages. Expand it to include sample threads, message reactions (emoji), and threaded conversations so developers can manually test the threads and reactions features without manually creating them.Background
The test-setup script in
scripts/test-setup.pybootstraps three test servers (Open, Private, Strict) with realistic conversation data to allow rapid local testing. However, it currently only creates flat messages. With the recent implementation of message threads (#21) and emoji reactions (#19), the script should be extended to include:This makes it much faster to visually test the UI, threading UI, unread indicators, etc. without manually clicking through the app to create sample data.
Requirements
test-setup.pyto accept and insert thread data (parent message → replies)thread_idon reply messagestest-setup.pyto accept and insert reaction data (message → emoji → list of users who reacted)reactionstable with proper(message_id, user_id, emoji)tuplesDesign
API / Interface Changes
No API changes; this is a test data generation script.
Data Model Changes
The schema itself doesn't change — only the data inserted. The script will use the existing
threads,thread_followers, andreactionstables that were added in #21 and #19.Script Changes
File:
scripts/test-setup.pyAdd new helper functions and config sections:
make_thread_id(parent_msg_id: str, idx: int) -> str— generate consistent thread IDsseed_threads(db_path, config)— insert threads and thread replies from configseed_reactions(db_path, config)— insert emoji reactions from configOPEN_CONFIG,PRIVATE_CONFIG,STRICT_CONFIGdictionaries with optionalthreadsandreactionssectionsExample config structure:
Component Changes
None — this is a developer tooling script, not a code component.
Task List
make_thread_id()helper function to generate thread IDsseed_threads(db_path, config)function that:config["threads"]threadstablethread_idsetreply_countandlast_reply_atseed_reactions(db_path, config)function that:config["reactions"]reactionstable:(message_id, user_id, emoji, created_at)seed_threads()andseed_reactions()in the main seed flow (after messages are inserted but before commit)OPEN_CONFIGwith at least 2 threads (at least one with 3+ replies)OPEN_CONFIGwith at least 5 different reactions showing varietyPRIVATE_CONFIGwith at least 1 threadPRIVATE_CONFIGprint_summary()to document available threads and reactions:Test List
python3 scripts/test-setup.py, verify script completes without errorsmake dev; open clientOpen Questions
thread_followerstable) to simulate users who have previously seen threads? Currently, no pre-seeding of followers (users discover threads by opening them). This may be fine for testing.:wave:)? The schema stores raw emoji, so using codepoints is correct, but this requires copy-pasting emoji or using Python's emoji support.