ThreadLens

Inspiration

Every ChatGPT user has experienced this with their chat history.

You're return to a chat history from last week and can't remember:

  • Where exactly was the information I was looking for?
  • Where was the exact answer ant the steps that solved my problem?
  • What was the final conclusion? -Where was that crucial answer?

The info is there, it's just hidden in hundreds of messages.

Projects are becoming the place where people do their software development, investing, research, travel planning, and long-term work, and conversations continue to grow while context becomes harder to recover.

I wanted to explore a simple question. **What if every conversation could self-understand and bring the most relevant information to the surface the moment you re-open it?

What it is for

ThreadLens adds a dynamic Context Layer to AI conversations.

ThreadLens employs GPT-5.6 to analyze the content of the conversation, and automatically generate a contextual widget that’s based on what the conversation is actually about — whenever a conversation is reopened.

For example, if a conversation is about gold prices, ThreadLens shows:

  • Current gold price
  • Daily price movements
  • Percentage gain/loss
  • trend chart 7 days
  • Last updated time stamp

When the conversation moves to software development, the widget automatically switches to show project milestones, completed tasks, blockers, and recent decisions.

In a travel chat you can see weather, countdowns, flight status and hotel details, and in a job search chat you can see interview stages, resume versions and upcoming action items.

Instead of rehashing the same conversations, users see information that is relevant today.


Conversational Intelligence

ThreadLens also creates a collapsible summary of the conversation for each chat history.

Rather than wading through hundreds of messages, users see succinct bullet points describing everything discussed.

Example:

▼ Gold Price Discussion • Versus analysts’ forecasts • Talked 22K vs 24K • Checked Costco gold prices • Looked at historical trends • Future price alert planning

Items in the summary are clickable to jump straight to the relevant part of the conversation.

How i built it

ThreadLens is built with Next.js, React, Typescript, Tailwind CSS, API for Responses from OpenAi, GPT-5.6, Zod, and Vitest.

The application is built around three server-side workflows:

  1. Analysis of conversation

The selected conversation is posted to a server-only API route. The GPT-5.6 provides structured data including conversation category, entities detected, summary, discussion points, widget suggestion, and confidence score.

The response is using Structured Outputs and is re-validated with Zod before it is allowed into the interface.

  1. Context of market data

After ThreadLens has identified a market entity, it requests a validated quote that includes the current value, daily movement, percentage change, timestamp, and seven-day series of that entity.

The series is rendered with a light weight SVG trend chart instead of a heavy charting dependency.

  1. Conversational question answering

“Ask this conversation” workflow sends the selected thread and user’s follow-up question to GPT-5.6. The model decides if the thread is relevant and if so responds with the context. The model has the ability to use web search to provide up to date information.

All OpenAI calls are server-based . The API Keys are never exposed to the browser.

Codex was used during the project to plan the implementation, scaffold the Next.js application, develop APIs and reusable components, create validation schemas, improve the responsive behavior, add accessibility states, and iterate on the final user experience.

Challenges ran into

Outputting model in a safe way to the interface

A visual widget needs predictable data. Free-form model text cannot be safely passed directly to components.

To overcome this, I created strict Zod contracts for conversation analysis, market information, and question-answer responses. GPT-5.6 sends back structured data and the server validates it again and sends it back to the client.

Supporting live data without making the demo fragile

Market data and web search may be incomplete due to missing credentials, provider availability, network conditions, or failed results.

ThreadLens uses a provider architecture with validated local gold, silver, NVIDIA and Tesla fixtures. Live and fallback states are clearly indicated so the interface never shows mock information as live data.

This allows judges to run and test the full experience with no API key, while also allowing the key turns on GPT-5.6 analysis, live Q&A and Web-assisted market lookups.

Linking summaries to the original dialogue

A standard AI summary still leaves the user searching for the original context.

I created index pointers which map each generated discussion point to a relevant message pair. Select an index item and it will scroll directly to the question and answer.

Responsive reproduction of complex product experience

ThreadLens needed to feel at home on desktop and mobile and it had to support a sidebar, project navigation, conversation history, contextual widgets, summaries, citations, and a chat composer.

We've added keyboard-friendly mobile navigation, focus containment and restoration, visible focus states, skip navigation, live status messaging, and reduced motion support.

Accomplishments that I'm proud of

I am proud that ThreadLens is not just a static interface mock up.

The prototype shows a complete flow:

  1. Choose a conversation

  2. Examine it via GPT-5.6.

  3. Find the appropriate entity.

  4. Display contextual market widget.

  5. Create a browserable Conversation Index.

  6. Pose a grounded follow-up question.

  7. When the situation requires, get recent information with clear supporting sources.

I also built the app such that I can validate all major responses that are coming from ai generation and external data, to gracefully degrade failures, and to keep the full demo usable without external services.

What i learned

What I learned is that a conversation can be treated as more than just a sequence of messages.

When its entities, topics, conclusions, and questions are represented as structured data, the conversation can power much more useful interfaces than a traditional chat transcript.

I also learned that when you add generative AI and live data, reliability counts. Structured Outputs , runtime validation , explicit source labels , citations and deterministic fallbacks made the prototype more trustworthy and easier to demonstrate .

Most importantly I found the best contextual widget is not selected manually by the user. It is inferred from the actual subject of the dialogue.

What's next for ThreadLens

The future of ThreadLens The MVP today is around market conversations but the same architecture can support many other contextual widgets

  • Travel widgets, such as weather, itineraries and countdowns

  • Milestones, decisions, blockers and other software-project widgets

  • Job-search widgets that include interview stages and action items

  • Health and fitness widgets with trends and goals

  • Explore sources, claims and open questions in widgets

Further development may also include:

  • Global context for multiple conversations

  • User configurable widget layouts

  • Additional trusted live data sources

  • Semantic search across chat

  • Continuous conversation updates

  • Project schedules and decision tracking

  • Native integration with AI chat platforms

My vision is simple:

Each conversation should give the information that will be most useful to the user when they return to it.

Built With

Share this project:

Updates