How do portable devices use batteries inline with chargers?
What you are looking for is called PMIC, "power management IC". Texas instruments has extensive portfolio  (~100s) products to fit various needs. (I am less familiar with LT offerings, and they usually are more expensive, and the TC4000 is a good example). NXP and several other IC manufacturers offer similar products. The PMICs are fairly intelligent devices that provide a lot of "services" for system (usually referenced as SYS) power:


They check for quality of input power;
If power is not present, they provide the SYS power from battery (usually Li-Ion)
if external power is available, they provide SYS power directly;
If battery is not fully charged, they charge it to pre-set specifications;
if SYS consumption and battery charging exceeds the preset limit for external supply, the ICs will scale battery charging down while providing the SYS voltage.
they provide full temperature control over chip itself and the managed battery.
they provide various optimizations like soft-start, under-voltage and over-voltage protection, etc.


All you need is to learn their terminology and select the IC that suits your particular requirements. Full system management solution usually requires a microprocessor that communicates with PMIC via a serial interface (usually I2C).