Skip to content

Commit 66025df

Browse files
committed
fix: restore missing imports for UserModel and SharedPreferences
1 parent b2406b2 commit 66025df

66 files changed

Lines changed: 1162 additions & 1022 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

GEMINI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ This project has a graphify knowledge graph at graphify-out/.
1111
Rules:
1212
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
1313
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
14-
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current
14+
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('lib'))"` to keep the graph current

graphify-out/GRAPH_REPORT.md

Lines changed: 87 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
# Graph Report - lib (2026-05-21)
22

33
## Corpus Check
4-
- 56 files · ~31,335 words
5-
- Verdict: corpus is large enough that graph structure adds value.
4+
- Corpus is ~29,315 words - fits in a single context window. You may not need a graph.
65

76
## Summary
8-
- 456 nodes · 577 edges · 30 communities detected
7+
- 441 nodes · 565 edges · 29 communities detected
98
- Extraction: 100% EXTRACTED · 0% INFERRED · 0% AMBIGUOUS
109
- Token cost: 0 input · 0 output
1110

1211
## Community Hubs (Navigation)
13-
- [[_COMMUNITY_Community 0|Community 0]]
14-
- [[_COMMUNITY_Community 1|Community 1]]
15-
- [[_COMMUNITY_Community 2|Community 2]]
16-
- [[_COMMUNITY_Community 3|Community 3]]
17-
- [[_COMMUNITY_Community 4|Community 4]]
18-
- [[_COMMUNITY_Community 5|Community 5]]
19-
- [[_COMMUNITY_Community 6|Community 6]]
20-
- [[_COMMUNITY_Community 7|Community 7]]
21-
- [[_COMMUNITY_Community 8|Community 8]]
22-
- [[_COMMUNITY_Community 9|Community 9]]
23-
- [[_COMMUNITY_Community 10|Community 10]]
24-
- [[_COMMUNITY_Community 11|Community 11]]
25-
- [[_COMMUNITY_Community 12|Community 12]]
26-
- [[_COMMUNITY_Community 13|Community 13]]
27-
- [[_COMMUNITY_Community 14|Community 14]]
28-
- [[_COMMUNITY_Community 15|Community 15]]
12+
- [[_COMMUNITY_Core Services|Core Services]]
13+
- [[_COMMUNITY_Mesh Routing|Mesh Routing]]
14+
- [[_COMMUNITY_App Entry & Lifecycle|App Entry & Lifecycle]]
15+
- [[_COMMUNITY_Mesh Handshake Logic|Mesh Handshake Logic]]
16+
- [[_COMMUNITY_Binary Packet Encoding|Binary Packet Encoding]]
17+
- [[_COMMUNITY_Geo Utils & Radar|Geo Utils & Radar]]
18+
- [[_COMMUNITY_Device Database Generated|Device Database Generated]]
19+
- [[_COMMUNITY_Data Management|Data Management]]
20+
- [[_COMMUNITY_Onboarding UI|Onboarding UI]]
21+
- [[_COMMUNITY_Profile & Identity UI|Profile & Identity UI]]
22+
- [[_COMMUNITY_System Health UI|System Health UI]]
23+
- [[_COMMUNITY_Navigation & Routing|Navigation & Routing]]
24+
- [[_COMMUNITY_Mesh Packet Types|Mesh Packet Types]]
25+
- [[_COMMUNITY_App Providers|App Providers]]
26+
- [[_COMMUNITY_Message Database Generated|Message Database Generated]]
27+
- [[_COMMUNITY_Relay Task Database Generated|Relay Task Database Generated]]
2928
- [[_COMMUNITY_Community 16|Community 16]]
3029
- [[_COMMUNITY_Community 17|Community 17]]
3130
- [[_COMMUNITY_Community 18|Community 18]]
@@ -35,171 +34,166 @@
3534
- [[_COMMUNITY_Community 22|Community 22]]
3635
- [[_COMMUNITY_Community 23|Community 23]]
3736
- [[_COMMUNITY_Community 24|Community 24]]
38-
- [[_COMMUNITY_Community 25|Community 25]]
39-
- [[_COMMUNITY_Community 26|Community 26]]
37+
- [[_COMMUNITY_Database Providers|Database Providers]]
38+
- [[_COMMUNITY_Profile Utilities|Profile Utilities]]
4039
- [[_COMMUNITY_Community 27|Community 27]]
4140
- [[_COMMUNITY_Community 28|Community 28]]
42-
- [[_COMMUNITY_Community 29|Community 29]]
4341

4442
## God Nodes (most connected - your core abstractions)
4543
1. `package:flutter/material.dart` - 13 edges
4644
2. `package:logging/logging.dart` - 13 edges
4745
3. `dart:typed_data` - 12 edges
48-
4. `package:isar_community/isar.dart` - 11 edges
49-
5. `package:riverpod_annotation/riverpod_annotation.dart` - 11 edges
50-
6. `package:off_chat/src/core/theme/app_theme.dart` - 10 edges
51-
7. `_` - 10 edges
52-
8. `dart:async` - 9 edges
53-
9. `package:flutter_riverpod/flutter_riverpod.dart` - 8 edges
54-
10. `package:off_chat/src/core/database/isar_service.dart` - 8 edges
46+
4. `package:riverpod_annotation/riverpod_annotation.dart` - 11 edges
47+
5. `package:off_chat/src/core/theme/app_theme.dart` - 10 edges
48+
6. `_` - 10 edges
49+
7. `dart:async` - 9 edges
50+
8. `package:flutter_riverpod/flutter_riverpod.dart` - 8 edges
51+
9. `package:off_chat/src/core/database/isar_service.dart` - 8 edges
52+
10. `package:isar_community/isar.dart` - 8 edges
5553

5654
## Surprising Connections (you probably didn't know these)
5755
- None detected - all connections are within the same source files.
5856

5957
## Communities
6058

61-
### Community 0 - "Community 0"
62-
Cohesion: 0.05
63-
Nodes (44): dart:async, dart:ui, onStart, NotificationService, _addLog, clearLogs, Function, _parseLevel (+36 more)
64-
65-
### Community 1 - "Community 1"
59+
### Community 0 - "Core Services"
6660
Cohesion: 0.04
67-
Nodes (40): Duration, Exception, IsarService, FoundDevice, Message, RelayTask, AckPacket, Exception (+32 more)
61+
Nodes (61): dart:async, dart:convert, dart:ui, NotificationService, onStart, NotificationService, _addLog, clearLogs (+53 more)
6862

69-
### Community 2 - "Community 2"
70-
Cohesion: 0.06
71-
Nodes (35): build, SystemHealth, SystemHealthState, BLEAdvertiser, getMtuForDevice, isDeviceConnected, ReadRequestResult, _waitForBluetooth (+27 more)
63+
### Community 1 - "Mesh Routing"
64+
Cohesion: 0.05
65+
Nodes (36): calculateScore, DirectedBeamRouter, MeshRouter, shouldRelayToPeer, StarburstRouter, AnimatedBuilder, build, _buildDeviceCard (+28 more)
7266

73-
### Community 3 - "Community 3"
67+
### Community 2 - "App Entry & Lifecycle"
7468
Cohesion: 0.06
75-
Nodes (32): main, build, didChangeAppLifecycleState, dispose, initState, OffChatApp, _OffChatAppState, _setOnlineStatus (+24 more)
69+
Nodes (29): main, NotificationService, build, didChangeAppLifecycleState, dispose, initState, OffChatApp, _OffChatAppState (+21 more)
7670

77-
### Community 4 - "Community 4"
78-
Cohesion: 0.08
79-
Nodes (24): dart:math, calculateBearing, calculateDistance, GeoUtils, build, _buildCenterAnchor, _buildDeviceBlip, _buildDistanceLabel (+16 more)
71+
### Community 3 - "Mesh Handshake Logic"
72+
Cohesion: 0.07
73+
Nodes (26): FoundDevice, Message, RelayTask, addNeighborToBreadcrumb, clearWaitingForImage, completeSync, completeSyncWithError, dropBreadcrumb (+18 more)
8074

81-
### Community 5 - "Community 5"
82-
Cohesion: 0.09
83-
Nodes (22): AnimatedBuilder, build, _buildDeviceCard, _buildProfileInfo, Container, DiscoveryScreen, _DiscoveryScreenState, dispose (+14 more)
75+
### Community 4 - "Binary Packet Encoding"
76+
Cohesion: 0.07
77+
Nodes (26): dart:typed_data, decodeCoordinate, encodeCoordinate, encodeLocation, encodeMainPacket, encodeScanResponseManufacturerData, MeshPacketEncoder, ChunkedTransferManager (+18 more)
8478

85-
### Community 6 - "Community 6"
86-
Cohesion: 0.09
87-
Nodes (22): addNeighborToBreadcrumb, clearWaitingForImage, completeSync, completeSyncWithError, dropBreadcrumb, _encryptMessage, enqueueForward, enqueueTerminalAck (+14 more)
79+
### Community 5 - "Geo Utils & Radar"
80+
Cohesion: 0.08
81+
Nodes (24): dart:math, calculateBearing, calculateDistance, GeoUtils, build, _buildCenterAnchor, _buildDeviceBlip, _buildDistanceLabel (+16 more)
8882

89-
### Community 7 - "Community 7"
83+
### Community 6 - "Device Database Generated"
9084
Cohesion: 0.09
9185
Nodes (21): deleteAllByIndex, deleteAllByIndexSync, deleteAllByStableIdSync, deleteByIndex, deleteByIndexSync, deleteByStableIdSync, _foundDeviceAttach, _foundDeviceDeserialize (+13 more)
9286

93-
### Community 8 - "Community 8"
94-
Cohesion: 0.09
95-
Nodes (21): deleteAllByDeviceIdSync, deleteAllByIndex, deleteAllByIndexSync, deleteByDeviceIdSync, deleteByIndex, deleteByIndexSync, getAllByIndex, getAllByIndexSync (+13 more)
87+
### Community 7 - "Data Management"
88+
Cohesion: 0.1
89+
Nodes (19): dart:io, Duration, Exception, IsarService, ChatController, IsarService, ProfileManager, saveProfilePicture (+11 more)
9690

97-
### Community 9 - "Community 9"
91+
### Community 8 - "Onboarding UI"
9892
Cohesion: 0.1
9993
Nodes (20): build, _buildFinalStep, _buildFooter, _buildPageIndicator, _buildSplashStep, _buildStep, Center, Container (+12 more)
10094

101-
### Community 10 - "Community 10"
95+
### Community 9 - "Profile & Identity UI"
10296
Cohesion: 0.11
103-
Nodes (17): build, _buildIdentityCard, _buildSettingCard, Container, CustomScrollView, dispose, initState, ProfileScreen (+9 more)
97+
Nodes (18): build, _buildIdentityCard, _buildSettingCard, _buildSubSettingCard, Container, CustomScrollView, dispose, initState (+10 more)
10498

105-
### Community 11 - "Community 11"
99+
### Community 10 - "System Health UI"
106100
Cohesion: 0.12
107-
Nodes (15): dart:convert, dart:io, ChatController, IsarService, ProfileManager, saveProfilePicture, SimpleKeyPairData, package:crypto/crypto.dart (+7 more)
101+
Nodes (16): build, SystemHealth, SystemHealthState, build, Container, _HealthItem, IconButton, Padding (+8 more)
108102

109-
### Community 12 - "Community 12"
103+
### Community 11 - "Navigation & Routing"
110104
Cohesion: 0.12
111105
Nodes (15): build, _calculateSelectedIndex, ChatScreen, GoRouter, _onItemTapped, router, Scaffold, ScaffoldWithNavBar (+7 more)
112106

113-
### Community 13 - "Community 13"
114-
Cohesion: 0.15
115-
Nodes (11): dart:typed_data, decodeCoordinate, encodeCoordinate, encodeLocation, encodeMainPacket, encodeScanResponseManufacturerData, MeshPacketEncoder, ChunkedTransferManager (+3 more)
107+
### Community 12 - "Mesh Packet Types"
108+
Cohesion: 0.13
109+
Nodes (14): AckPacket, Exception, IdentityPacket, ImagePacket, MeshPacket, NotificationService, PacketContext, parse (+6 more)
116110

117-
### Community 14 - "Community 14"
111+
### Community 13 - "App Providers"
118112
Cohesion: 0.25
119113
Nodes (9): _, build, create, debugGetCreateSourceHash, isServiceRunning, overrideWithValue, runBuild, scanProgress (+1 more)
120114

121-
### Community 15 - "Community 15"
115+
### Community 14 - "Message Database Generated"
122116
Cohesion: 0.29
123117
Nodes (6): IsarError, _messageAttach, _messageDeserialize, _messageEstimateSize, _messageGetId, _messageSerialize
124118

125-
### Community 16 - "Community 16"
119+
### Community 15 - "Relay Task Database Generated"
126120
Cohesion: 0.29
127121
Nodes (6): IsarError, _relayTaskAttach, _relayTaskDeserialize, _relayTaskEstimateSize, _relayTaskGetId, _relayTaskSerialize
128122

129-
### Community 17 - "Community 17"
123+
### Community 16 - "Community 16"
130124
Cohesion: 0.4
131125
Nodes (6): _, build, create, debugGetCreateSourceHash, overrideWithValue, runBuild
132126

133-
### Community 18 - "Community 18"
127+
### Community 17 - "Community 17"
134128
Cohesion: 0.4
135129
Nodes (6): _, call, create, debugGetCreateSourceHash, runBuild, toString
136130

137-
### Community 19 - "Community 19"
131+
### Community 18 - "Community 18"
138132
Cohesion: 0.4
139133
Nodes (6): _, build, create, debugGetCreateSourceHash, overrideWithValue, runBuild
140134

141-
### Community 20 - "Community 20"
135+
### Community 19 - "Community 19"
142136
Cohesion: 0.4
143137
Nodes (4): create, debugGetCreateSourceHash, notificationService, overrideWithValue
144138

145-
### Community 21 - "Community 21"
139+
### Community 20 - "Community 20"
146140
Cohesion: 0.4
147141
Nodes (4): create, debugGetCreateSourceHash, overrideWithValue, router
148142

149-
### Community 22 - "Community 22"
143+
### Community 21 - "Community 21"
150144
Cohesion: 0.67
151145
Nodes (4): _, create, debugGetCreateSourceHash, runBuild
152146

153-
### Community 23 - "Community 23"
147+
### Community 22 - "Community 22"
154148
Cohesion: 0.67
155149
Nodes (4): _, create, debugGetCreateSourceHash, runBuild
156150

157-
### Community 24 - "Community 24"
151+
### Community 23 - "Community 23"
158152
Cohesion: 0.67
159153
Nodes (4): _, create, debugGetCreateSourceHash, runBuild
160154

161-
### Community 25 - "Community 25"
155+
### Community 24 - "Community 24"
162156
Cohesion: 0.67
163157
Nodes (4): _, create, debugGetCreateSourceHash, runBuild
164158

165-
### Community 26 - "Community 26"
159+
### Community 25 - "Database Providers"
166160
Cohesion: 0.67
167161
Nodes (2): debugGetCreateSourceHash, isarDatabase
168162

169-
### Community 27 - "Community 27"
163+
### Community 26 - "Profile Utilities"
170164
Cohesion: 0.67
171165
Nodes (2): generateProfileHash, ProfileUtils
172166

173-
### Community 28 - "Community 28"
167+
### Community 27 - "Community 27"
174168
Cohesion: 1.0
175169
Nodes (1): MeshConstants
176170

177-
### Community 29 - "Community 29"
171+
### Community 28 - "Community 28"
178172
Cohesion: 1.0
179173
Nodes (1): title
180174

181175
## Knowledge Gaps
182-
- **354 isolated node(s):** `main`, `package:off_chat/src/app.dart`, `OffChatApp`, `_OffChatAppState`, `initState` (+349 more)
176+
- **340 isolated node(s):** `main`, `NotificationService`, `package:off_chat/src/app.dart`, `OffChatApp`, `_OffChatAppState` (+335 more)
183177
These have ≤1 connection - possible missing edges or undocumented components.
184-
- **Thin community `Community 28`** (2 nodes): `constants.dart`, `MeshConstants`
178+
- **Thin community `Community 27`** (2 nodes): `constants.dart`, `MeshConstants`
185179
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
186-
- **Thin community `Community 29`** (2 nodes): `extensions.dart`, `title`
180+
- **Thin community `Community 28`** (2 nodes): `extensions.dart`, `title`
187181
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
188182

189183
## Suggested Questions
190184
_Questions this graph is uniquely positioned to answer:_
191185

192-
- **Why does `dart:typed_data` connect `Community 13` to `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 9`, `Community 11`?**
193-
_High betweenness centrality (0.096) - this node is a cross-community bridge._
194-
- **Why does `package:flutter/material.dart` connect `Community 3` to `Community 0`, `Community 2`, `Community 4`, `Community 5`, `Community 9`, `Community 10`, `Community 11`, `Community 12`?**
195-
_High betweenness centrality (0.081) - this node is a cross-community bridge._
196-
- **Why does `package:logging/logging.dart` connect `Community 0` to `Community 1`, `Community 2`, `Community 6`, `Community 11`, `Community 12`, `Community 13`?**
197-
_High betweenness centrality (0.064) - this node is a cross-community bridge._
198-
- **What connects `main`, `package:off_chat/src/app.dart`, `OffChatApp` to the rest of the system?**
199-
_354 weakly-connected nodes found - possible documentation gaps or missing edges._
200-
- **Should `Community 0` be split into smaller, more focused modules?**
201-
_Cohesion score 0.05 - nodes in this community are weakly interconnected._
202-
- **Should `Community 1` be split into smaller, more focused modules?**
186+
- **Why does `dart:typed_data` connect `Binary Packet Encoding` to `Core Services`, `Mesh Routing`, `Mesh Handshake Logic`, `Geo Utils & Radar`, `Data Management`, `Onboarding UI`, `Mesh Packet Types`?**
187+
_High betweenness centrality (0.105) - this node is a cross-community bridge._
188+
- **Why does `package:flutter/material.dart` connect `App Entry & Lifecycle` to `Mesh Routing`, `Binary Packet Encoding`, `Geo Utils & Radar`, `Data Management`, `Onboarding UI`, `Profile & Identity UI`, `System Health UI`, `Navigation & Routing`?**
189+
_High betweenness centrality (0.090) - this node is a cross-community bridge._
190+
- **Why does `package:logging/logging.dart` connect `Core Services` to `App Entry & Lifecycle`, `Mesh Handshake Logic`, `Binary Packet Encoding`, `Data Management`, `Navigation & Routing`, `Mesh Packet Types`?**
191+
_High betweenness centrality (0.074) - this node is a cross-community bridge._
192+
- **What connects `main`, `NotificationService`, `package:off_chat/src/app.dart` to the rest of the system?**
193+
_340 weakly-connected nodes found - possible documentation gaps or missing edges._
194+
- **Should `Core Services` be split into smaller, more focused modules?**
203195
_Cohesion score 0.04 - nodes in this community are weakly interconnected._
204-
- **Should `Community 2` be split into smaller, more focused modules?**
196+
- **Should `Mesh Routing` be split into smaller, more focused modules?**
197+
_Cohesion score 0.05 - nodes in this community are weakly interconnected._
198+
- **Should `App Entry & Lifecycle` be split into smaller, more focused modules?**
205199
_Cohesion score 0.06 - nodes in this community are weakly interconnected._

graphify-out/cost.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"runs": [
3+
{
4+
"date": "2026-05-21T14:22:19.117312+00:00",
5+
"input_tokens": 0,
6+
"output_tokens": 0,
7+
"files": 55
8+
}
9+
],
10+
"total_input_tokens": 0,
11+
"total_output_tokens": 0
12+
}

graphify-out/graph.html

Lines changed: 257 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)