ull;
                  })
                  .filter(Boolean);

              if (!featureIds.length) return;

              try {
                  // Use absolute URL path for API endpoint
                  const voteCountUrl = `/api/feature-vote-count?feature_ids=${featureIds.join(',')}`;
                  console.log('Fetching vote counts from:', voteCountUrl);

                  const response = await fetch(voteCountUrl);
                  if (!response.ok) throw new Error(`Network response was not ok: 