aws / aws/graph-explorer

Migrate the connection storage type to a flat connection record

Open
#1,843 0 comments 0 reactions 0 assignees View on GitHub
connection internal tech debt
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
8d 9h
Merged PRs (30d)
7

Description

Slice 4 (final) of #1839. Retire `RawConfiguration` as the persisted storage type. Today `configurationAtom` is a `Map`, where `RawConfiguration` is now a thin `{ id, displayLabel?, connection? }` wrapper that nests the connection one level down and marks it optional — a shape that no longer carries its weight. The codebase already grew `ConnectionWithId` (`ConnectionConfig & { id, displayLabel? }`) to cope with that awkwardness, and bridge code exists solely to flatten and re-nest between the two.

Collapse the storage type into a flat connection record so a stored connection simply *is* a connection with an id, and retire `RawConfiguration`. The merge input (`mergeConfiguration`), the default-connection builder, the connection UI modules, and the test helpers all follow from that storage-type choice.

Constraints:

- Behavior-preserving. `configurationAtom` is persisted to IndexedDB — an upgrading user whose stored connections use the old nested shape must not lose data or hit an error. Hoist the legacy nested shape at the boundary rather than scattering compatibility reads.
- Pin backward-compatible behavior with regression tests for the old persisted shape *before* refactoring, per `.kiro/skills/testing/SKILL.md`.
- Prefer reusing/extending the existing flat connection type over introducing a third near-twin.
- Land the single Option B ADR with this slice, documenting the three distinct connection shapes (wire / in-memory / storage), and reconcile the `CONTEXT.md` "three distinct shapes" note against it.

> [!IMPORTANT]
> Internal only — this issue is maintained by the core team and is not accepting external contributions.

Contributor guide

Open the contributing guide

Research direction

Start with configurationAtom, RawConfiguration, ConnectionWithId, and mergeConfiguration, then trace the default-connection builder, connection UI modules, and test helpers named in the issue. Read .kiro/skills/testing/SKILL.md and add regression coverage for the legacy IndexedDB shape before changing the storage type. Done means behavior is preserved, the Option B ADR is included, and CONTEXT.md agrees with the three-shape model.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
database, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.