Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

feat: New conversation composer + refactor and fix profile socials + many other chat related fixes #1569

Merged
merged 29 commits into from
Feb 5, 2025

Conversation

technoplato
Copy link
Contributor

@technoplato technoplato commented Jan 22, 2025

@thierryskoda made this loom quickly going over the meat and potatoes https://www.loom.com/share/acc615ce8db0450ca6023dd83b07645e

@technoplato technoplato requested review from a team as code owners January 22, 2025 16:25
Copy link
Contributor

github-actions bot commented Jan 22, 2025

Performance Comparison Report

  • Current: dadf93e - 2025-01-23 22:32:26Z
  • Baseline: main (5dcbc75) - 2025-01-23 22:31:20Z

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Type Duration Count
Avatar Image 10 runs render 0.8 ms → 0.6 ms (-0.2 ms, -25.0%) 🟢 1 → 1
Avatar Image 50 runs render 0.6 ms → 0.6 ms (-0.0 ms, -3.1%) 1 → 1
Empty Avatar 10 runs render 1.0 ms → 1.1 ms (+0.1 ms, +10.0%) 1 → 1
Empty Avatar 50 runs render 1.0 ms → 1.0 ms 1 → 1
Text Component with color prop - 10 runs render 0.6 ms → 0.5 ms (-0.1 ms, -16.7%) 🟢 1 → 1
Text Component with default props - 10 runs render 0.9 ms → 0.7 ms (-0.2 ms, -22.2%) 🟢 1 → 1
Text Component with translation key - 10 runs render 0.8 ms → 0.4 ms (-0.4 ms, -50.0%) 🟢 1 → 1
Text Component with weight and size - 10 runs render 0.5 ms → 0.5 ms 1 → 1
Show details
Name Type Duration Count
Avatar Image 10 runs render Baseline
Mean: 0.8 ms
Stdev: 0.4 ms (52.7%)
Runs: 1 0 1 1 1 1 1 0 1 1
Warmup runs: 1

Current
Mean: 0.6 ms
Stdev: 0.5 ms (86.1%)
Runs: 0 1 0 1 1 0 1 1 1 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Avatar Image 50 runs render Baseline
Mean: 0.6 ms
Stdev: 0.5 ms (75.8%)
Runs: 0 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 1 1 1
Warmup runs: 1

Current
Mean: 0.6 ms
Stdev: 0.5 ms (79.1%)
Runs: 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:
Empty Avatar 10 runs render Baseline
Mean: 1.0 ms
Stdev: 0.0 ms (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Warmup runs: 2

Current
Mean: 1.1 ms
Stdev: 0.3 ms (28.7%)
Runs: 1 1 1 1 1 1 1 1 1 2
Warmup runs: 2
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Empty Avatar 50 runs render Baseline
Mean: 1.0 ms
Stdev: 0.1 ms (14.4%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Warmup runs: 1

Current
Mean: 1.0 ms
Stdev: 0.2 ms (25.2%)
Runs: 1 2 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with color prop - 10 runs render Baseline
Mean: 0.6 ms
Stdev: 0.5 ms (86.1%)
Runs: 1 0 0 0 1 1 1 1 0 1
Warmup runs: 0

Current
Mean: 0.5 ms
Stdev: 0.5 ms (105.4%)
Runs: 0 0 1 0 0 1 1 1 1 0
Warmup runs: 0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with default props - 10 runs render Baseline
Mean: 0.9 ms
Stdev: 0.7 ms (82.0%)
Runs: 2 2 1 1 1 0 0 0 1 1
Warmup runs: 3

Current
Mean: 0.7 ms
Stdev: 0.5 ms (69.0%)
Runs: 1 1 1 0 1 1 1 0 0 1
Warmup runs: 3
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with translation key - 10 runs render Baseline
Mean: 0.8 ms
Stdev: 0.4 ms (52.7%)
Runs: 1 1 1 1 1 0 1 1 1 0
Warmup runs: 1

Current
Mean: 0.4 ms
Stdev: 0.5 ms (129.1%)
Runs: 0 0 0 1 0 0 1 1 0 1
Warmup runs: 1
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:
Text Component with weight and size - 10 runs render Baseline
Mean: 0.5 ms
Stdev: 0.5 ms (105.4%)
Runs: 1 1 0 1 1 0 0 0 1 0
Warmup runs: 0

Current
Mean: 0.5 ms
Stdev: 0.5 ms (105.4%)
Runs: 1 1 1 0 0 1 0 1 0 0
Warmup runs: 0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Render issues:

Render Count Changes

There are no entries

Render Issues

There are no entries

Added Scenarios

There are no entries

Removed Scenarios

There are no entries

Generated by 🚫 dangerJS against 60e7dbe

};

const getConversations = async (
args: IArgs & {
// We want to track who's making new calls to the network
caller: string;
}
) => {
): Promise<ConversationWithCodecsType[]> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

😢


const conversationsWithMembers = await Promise.all(
conversations.map(async (c) => {
const members = await c.members();
Copy link
Contributor

Choose a reason for hiding this comment

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

export function fetchOrGetGroupMembers (args: {
account: string;
topic: ConversationTopic;
}): Promise {
const members = getGroupMembersQueryData({ account, topic });

if (!members) {
return fetchGroupMembers(args);
}

return members
}

// Map conversations list to an array of ConversationWithCodecsType by
// fetching members for each conversation

const conversationsWithMembers = await Promise.all(
Copy link
Contributor

Choose a reason for hiding this comment

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

try catch

Comment on lines 24 to 26
if (!members.length) {
return undefined;
}
Copy link

Choose a reason for hiding this comment

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

The function currently returns undefined for empty arrays but the test expects it to throw an error. To maintain consistency with the test suite, this function should throw an Error with a descriptive message like Cannot generate hash for empty members array. This will also provide clearer feedback when invalid input is provided.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@thierryskoda thierryskoda force-pushed the ml/optimistic-create-conversation branch 2 times, most recently from 5436f11 to f2e15e5 Compare February 3, 2025 17:11
@thierryskoda thierryskoda force-pushed the ml/optimistic-create-conversation branch from f2e15e5 to 654c1be Compare February 3, 2025 19:03
@thierryskoda thierryskoda changed the title [draft] Optimistic Conversation Creation / Show existing conversation if exists feat: New conversation composer + refactor and fix profile socials + many other chat related fixes Feb 5, 2025
@thierryskoda thierryskoda merged commit 0787148 into main Feb 5, 2025
5 of 6 checks passed
@thierryskoda thierryskoda deleted the ml/optimistic-create-conversation branch February 5, 2025 20:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants