Priority Voting Feature System - Comprehensive Analysis
Executive Summary
ā FEATURE EXISTS AND IS IMPLEMENTED
The UNPARTY app contains a comprehensive Priority Voting Feature System that allows users to:
Create and vote on feature priorities
Comment on priorities
Track feature development progress
Organize priorities in communities
View analytics and insights on feature popularity
This system was built with local-first architecture using LocalStorageManager, consistent with UNPARTY's privacy-first focus.
---
š Core Directory Structure
Primary Feature Location: TableofContents/Features/
TableofContents/Features/
āāā BetaFeatureDetailsView.swift (7.2K) - Beta feature listing and details
āāā BetaFeatureRow.swift (1.1K) - Row component for beta features
āāā FeatureCommentView.swift (5.3K) - Comment interface for features
āāā FeatureDetailSheet.swift (8.4K) - Detailed feature view modal
āāā FeatureTask.swift (34K) - Main FeatureTask model with SwiftData
āāā FeaturesHomeView.swift (21K) - Main features hub with tabs
āāā PriorityCreationView.swift (2.3K) - Create new priority form
āāā PriorityVoteView.swift (4.4K) - Voting interface (thumbs up/down)
āāā TaskFeatureMappingView.swift (26K) - Maps tasks to features, progress trackingData Models: AppSources/MODELS/
AppSources/MODELS/
āāā Priority.swift (2.9K) - Priority data model (votes, scores, IDs)
āāā PriorityStore.swift (6.1K) - Priority business logic & local storage
āāā PriorityInsight.swift (316B) - Priority analytics model
āāā Community.swift (Community & CommunityStore for grouping priorities)
āāā Comment.swift - Comments on prioritiesUI Views: AppSources/VIEWS/COMMUNITY/
AppSources/VIEWS/COMMUNITY/
āāā PriorityCommunityView.swift - Main priority management interfaceDashboard Integration
TableofContents/UnpartyDashboard/
āāā CommunityDashboard.swift - Dashboard showing priority stats
āāā DashboardSection.swift - References priority views---
šļø Architecture Overview
Data Flow
User Interface (Views)
ā
ViewModel Layer (PriorityStore, CommunityStore)
ā
Local Storage Manager
ā
JSON Files (Local Storage)Key Components
#### 1. Priority Model (Priority.swift)
Properties:
id: String - Unique identifier
name: String - Priority name
description: String - Priority description
moreCount: Int - "Yes, more!" votes
nahCount: Int - "Nah" votes
communityID: String? - Associated community
createdAt: Date - Creation timestamp
modifiedAt: Date - Last update timestamp
Computed Properties:
balance - Difference between more and nah votes (moreCount - nahCount)
score - Prioritization score (max(0, (moreCount * 2) - nahCount))
Storage: Local JSON via LocalStorageManager
#### 2. PriorityStore (PriorityStore.swift)
Responsibilities:
Load/save priorities from local storage
Add new priorities
Record votes (more/nah)
Manage comments
Compute analytics (trending, controversial)
Key Methods:
func loadPriorities() async
func addPriority(name: String, description: String) async throws
func addVote(isMore: Bool, priorityID: String) async throws
func addComment(text: String, priorityID: String) async throwsComputed Collections:
sortedPriorities - Sorted by score
trendingPriorities - High engagement, positive votes
controversialPriorities - Close vote splits, high engagement
#### 3. BetaFeature Model (BetaFeature.swift)
Simple feature representation
Can be converted to FeatureTask for tracking
Links to priorities via PriorityVoteView
#### 4. FeatureTask Model (FeatureTask.swift)
SwiftData model for persistent feature tracking
Properties include:
Progress (0.0 to 1.0)
Status (notStarted, inProgress, completed)
Category (general, UI, backend, etc.)
Achievement points
Related journal IDs
Link back to originating BetaFeature
#### 5. Community System (Community.swift)
Groups priorities together
Tracks member count
Managed by CommunityStore
Delegates priority operations to PriorityStore
---
šØ User Interface Components
1. FeaturesHomeView - Main Hub
Location: TableofContents/Features/FeaturesHomeView.swift
Features:
Three-section interface: YOU, UNPARTY, PROGRESS
Segmented navigation with smooth scrolling
Task completion tracking
Orbital decoration animations
Pull-to-refresh
2. PriorityVoteView - Voting Interface
Location: TableofContents/Features/PriorityVoteView.swift
UI Elements:
Feature header with name and description
Thumbs up (š) "Yes, more!" button (green)
Thumbs down (š) "Nah" button (red)
Loading state during vote submission
Error messaging
3. PriorityCommunityView - Priority Management
Location: AppSources/VIEWS/COMMUNITY/PriorityCommunityView.swift
Features:
Create new priorities form
List of all priorities sorted by score
Interactive priority rows with voting
Comment sections
Vote balance indicators with colors:
Green: balance > 5 (popular)
Red: balance < -5 (unpopular)
Primary: neutral
4. TaskFeatureMappingView - Progress Tracking
Location: TableofContents/Features/TaskFeatureMappingView.swift
Features:
Two tabs: Features and Implementation
Overall beta progress calculation
Feature score calculations
Achievement badges
Expandable feature details
5. CommunityDashboard - Analytics
Location: TableofContents/UnpartyDashboard/CommunityDashboard.swift
Features:
Statistics header
Priority grid/list view toggle
Time frame filtering (Day/Week/Month/Year)
Engagement metrics
Insights section
---
š Integration Points
App Initialization (AppSources/uappApp.swift)
// Line 23: Priority store is created at app level
@StateObject private var priorityStore = PriorityStore()
// Lines 75-84: Proper dependency injection with logging
let priorityStoreInstance = uCreate(PriorityStore.self, category: .data) {
PriorityStore()
}
let communityStoreInstance = uCreate(CommunityStore.self, category: .data, dependencies: ["PriorityStore"]) {
CommunityStore(withPriorityStore: priorityStoreInstance)
}Environment Object Injection
Views receive stores via @EnvironmentObject:
@EnvironmentObject var priorityStore: PriorityStore
@EnvironmentObject var communityStore: CommunityStore---
š Privacy-First Architecture
Slack Integration - REMOVED
Status: ā DEPRECATED AND REMOVED
As part of UNPARTY's commitment to privacy-first design, the Slack integration feature has been removed from the application. Previously, there was an API endpoint (slack.feedback) in ApiInfo.json that would have allowed sending user feedback to the development team's Slack workspace.
Removal Rationale:
Privacy-first focus: User data stays local
No third-party integrations for user-generated content
Eliminates potential data transmission to external services
Aligns with local-first architecture principles
Alternative Approach:
All feedback and priorities remain local-only
Community features operate entirely within the app
No external notifications or webhooks
---
š Feature Capabilities
Current Working Features ā
1. Priority Creation
Users can create named priorities with descriptions
Stored locally via LocalStorageManager
Associated with communities
2. Voting System
Binary voting: "More" (š) or "Nah" (š)
Vote counts tracked per priority
Real-time score calculation
Balance and score metrics
3. Comments
Users can comment on priorities
Comments stored with priority ID reference
Displayed in priority detail views
4. Analytics & Insights
Sorted priorities by score
Trending priorities (high positive engagement)
Controversial priorities (close vote splits)
Overall progress tracking
5. Community Organization
Group priorities by community
Track member counts
Community-scoped priority lists
6. Feature Tracking
Beta features linked to priorities
FeatureTask model for detailed tracking
Progress percentages
Achievement badges
Milestone tracking
Incomplete/TODO Items ā ļø
1. PriorityVoteView.swift (Lines 108-141)
getOrCreatePriority() method has empty implementation
Needs to connect to PriorityStore
2. PriorityCreationView.swift (Line 77-79)
createPriority() just shows "BUG" text
Needs actual implementation
3. PriorityStore.swift
Missing delete operations (lines 119, 177)
Missing comment loading (line 196)
4. LocalInsightsViewModel Dependency
Multiple TODOs to remove this dependency
Views currently reference it but it's deprecated
---
š Search Keywords & Locations
| Keyword | Files Found | Key Locations |
|---|---|---|
| priority | 20+ files | TableofContents/Features/, AppSources/MODELS/ |
| vote | 9 files | Priority.swift, PriorityVoteView.swift, PriorityCommunityView.swift |
| feature | 30+ files | TableofContents/Features/, TableofContents/Tasks/ |
| task | 15+ files | TableofContents/Tasks/, FeatureTask.swift |
---
šÆ Recommended Actions for Focus & Integration
Phase 1: Complete Existing Implementation (High Priority)
1. Fix PriorityVoteView ā ļø
Implement getOrCreatePriority() method
Connect to PriorityStore.shared
Handle priority lookup and creation
2. Fix PriorityCreationView ā ļø
Implement actual createPriority() logic
Connect to PriorityStore
Add error handling
3. Complete PriorityStore
Add delete operations
Implement comment loading
Add error recovery
Phase 2: UI/UX Enhancement (Medium Priority)
1. Navigation
Add priority features to main navigation
Create dedicated tab or menu item
Link from dashboard
2. Discoverability
Onboarding flow for priority voting
Tutorial/help screens
Empty state guidance
3. In-App Notifications
In-app notifications for votes
Badge counts for new priorities
Achievement unlocks
Local notification system (no external services)
Phase 3: Advanced Features (Low Priority)
1. Social Features
User profiles on votes/comments
@mentions in comments
Share priorities
2. Advanced Analytics
Vote history graphs
User engagement metrics
Export capabilities
3. Gamification
Badges for voting activity
Leaderboards
Rewards system
---
š Complete File List
Core Feature Files (9 files)
TableofContents/Features/
āāā BetaFeatureDetailsView.swift
āāā BetaFeatureRow.swift
āāā FeatureCommentView.swift
āāā FeatureDetailSheet.swift
āāā FeatureTask.swift
āāā FeaturesHomeView.swift
āāā PriorityCreationView.swift
āāā PriorityVoteView.swift
āāā TaskFeatureMappingView.swiftData Models (5 files)
AppSources/MODELS/
āāā Comment.swift
āāā Community.swift
āāā Priority.swift
āāā PriorityInsight.swift
āāā PriorityStore.swiftUI Views (2+ files)
AppSources/VIEWS/
āāā COMMUNITY/PriorityCommunityView.swift
āāā CommentSection.swiftTasks Models (2 files)
TableofContents/Tasks/Models/
āāā BetaFeature.swift
āāā UnpartyTaskManager.swiftDashboard Integration (2 files)
TableofContents/UnpartyDashboard/
āāā CommunityDashboard.swift
āāā DashboardSection.swiftConfiguration (1 file)
AppSources/API/
āāā ApiInfo.json (API configuration - Slack entry removed for privacy)---
š Quick Start Guide for Development
To Work on Priority Features:
1. Open Main Feature Hub:
// Navigate to FeaturesHomeView from app
// Located in TableofContents/Features/FeaturesHomeView.swift2. Access Priority Store:
@EnvironmentObject var priorityStore: PriorityStore
// Already injected at app level (uappApp.swift line 23)3. Create a Priority:
try await priorityStore.addPriority(
name: "Feature Name",
description: "Feature Description"
)4. Add a Vote:
try await priorityStore.addVote(
isMore: true, // true for "more", false for "nah"
priorityID: priority.id
)5. View Priorities:
// Sorted by score
priorityStore.sortedPriorities
// Trending (high engagement)
priorityStore.trendingPriorities
// Controversial (close votes)
priorityStore.controversialPrioritiesTo Test the Feature:
1. Build and run the app 2. Navigate to Community Dashboard or Features Home 3. Create a test priority 4. Vote on priorities 5. Add comments 6. View analytics
---
š” Conclusion
The Priority Voting Feature System is substantially implemented with:
ā Complete data models
ā Local storage integration (privacy-first)
ā Voting mechanism
ā Comment system
ā Analytics and insights
ā UI components
ā ļø Some incomplete implementations (PriorityVoteView, PriorityCreationView)
Privacy-First Focus: All Slack integration references have been removed to align with UNPARTY's privacy-first architecture. All features operate locally without external data transmission.
Recommendation: Focus on completing the incomplete implementations (Phase 1), then enhance UI/UX (Phase 2) with local-only notifications and improved navigation.
---
Document Generated: 2025-11-11 Document Updated: 2025-11-12 (Privacy-first updates) Investigation Status: Complete ā Total Files Analyzed: 30+ files Lines of Code: ~3,000+ lines dedicated to priority voting features